Alexander Gundermann
Alexander Gundermann
I believe this is what you want: [link](https://stackoverflow.com/questions/26603499/simple-solution-to-share-modules-loaded-via-npm-across-multiple-browserify-or-we/29087883#29087883) (using `minChunks` function parameter for `CommonsChunkPlugin`). I agree that it would be nice to have a more straightforward way of setting that...
I don't think the order in which they are included in the bundle should really make a difference, should it? I'm guessing you're concerned about the order in which they...
What are you trying to do exactly? These all look like modules that were not designed for the browser. If you use webpack to transpile and bundle your node js...
It's babel that's doing this and it's actually the correct behavior, see [mdn](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Lexical_arguments). Use normal `function` instead, or rest parameters `(a, b, ...rest) =>`.
Have you looked at [the docs](https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin)? You can whitelist `require`.
When you say "wait for vendor file to load", do you mean you want to load the vendor chunk asynchronously?
For the synchronous case, does that work? ``` js entry: { promise: ['promise'], prefetch: './prefetch.js', app: './app.js', vendor: Object.keys(packageJSON.dependencies) }, plugins: [ new webpack.optimize.CommonsChunkPlugin( 'vendor', '[name].js', Infinity ), new webpack.optimize.CommonsChunkPlugin('loader.js')...
You could use [expose-loader](https://github.com/webpack/expose-loader) to expose your own require. ``` js // config module.exports = { entry: [ 'expose?myRequire!./my-require', './app.js' ] } // my-require.js const allModules = { jquery: ()...
You can set `target: 'node'` in your webpack.config file ([docs](http://webpack.github.io/docs/configuration.html#target)). This should get rid of the node API errors and leave the require calls inside your bundle. It might be...
Here's what I noticed: - you have to put the path expression directly inside the require statement: `var response = require(`../${componentName}/${componentName}`)` - project-relative paths like in your `loadComponent1` are not...