javascript - How to chain multiple webpack loaders, which modify source code -


basically rather theoretical question.

let's have source file a.js , loaders l1-loader.js , l2-loader.js.

so l1 modify our file a1 state , l2 a12 state. l2(l1(a.js)).

my aim a.js source in browser console.

1) should both loaders produce source-maps?

2) how l2-loader should interact l1-sourcemaps produce correct a12 sourcemap?

3) way easiest produce correct sourcemap loader l1, l2-loader babel, , l1 loader append lines source code?

example transform 3-rd question:

define({}) 

to

define(function(){    return window.blackmagic ? null : {}; }); 


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -