Alexander Gundermann
Alexander Gundermann
I'm not too familiar with the terminology and internals of webpack either. There is some documentation about contexts here: https://webpack.github.io/docs/context.html . It also explains how to use require.context to create...
I wonder if that would work: ``` js // webpack.config.js module: { loaders: [ { test: /\.js$/, exclude: [/config\.js/, /module\.js/], loader: 'exports-loader?require("config")(module)' } ] }, resolve: { alias: { config:...
This seems to work: ``` js externals: { react: { root: 'React', commonjs: 'react', commonjs2: 'react', amd: 'react' } } ```
Sure thing! :) Just noticed, there's also an official example: https://github.com/webpack/webpack/tree/master/examples/externals
Try with imports loader ``` require('imports?define=>false!postal'); ``` From https://webpack.github.io/docs/shimming-modules.html#fixing-broken-module-styles
As far as I can tell it's intentional: https://github.com/webpack/webpack/issues/187 (to behave like [browser-resolve](https://github.com/defunctzombie/node-browser-resolve)). And here's webpacks defaults https://github.com/webpack/node-libs-browser . You can fix it in your config, for examply by writing...
Put the polyfills in their own modules and prepend require calls to modules as they need them. It's similar to how [script-loader](https://github.com/webpack/script-loader) does it, among others I think. Also mentioned...
As far as I can tell, you need to use a separate script-loading module for that. See #150 . With that approach, you could write a module to be able...
Not sure what you're asking for exactly.. Afaik you can do this: ``` js { test: /\.css$/, loaders: ["url?" + JSON.stringify({mimetype: "image/png"})] } // resolves to { test: /\.css$/, loaders:...
Hm, with a module like this ``` js if(__TEST__){ require(__TEST__); } ``` all these work as expected for me: ``` js new webpack.DefinePlugin({ "__TEST__": false, "__TEST__": JSON.stringify(false), "__TEST__": JSON.stringify(""), "__TEST__":...