Webpack dependencies between external files -


i'm looking @ migrating requirejs project webpack i've run problem. requirejs shims allow me express dependencies between external (non amd) libraries e.g.

require.config({     paths: {         jquery: '../bower_components/jquery/dist/jquery',         foundation: '../bower_components/foundation/js/foundation'     },     shim: {         "foundation": ['jquery']     } }  require(['foundation'], function(f, app) {     // use foundation (jquery resolved) }); 

how can achieve similar webpack? examples have seen talk webpack module (commonjs or amd) depending on external libraries can't find wiring dependencies between external libaries.

you can try exports , imports loader. used lib ember. should :

module: {     loaders: [{         test: /foundation.js$/,         loader: 'exports?foundation!imports?jquery'       }] } 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -