Hi,
First I have to give creds for a fantastic job on this tool! It seems to be getting even more traction now that Facebook backing up with more "get going" documentation. At least that got me started :-)
Anyways, this is my config file. My goal is to optimize rebundling speed as I am using React JS and it adds a lot to the dependency tree.
var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');
module.exports = {
entry: ['webpack/hot/dev-server', './app/main.js'],
output: {
path: './build',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, loader: 'jsx-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' }
]
},
plugins: [commonsPlugin]
};
If I run webpack-dev-server --progress --colors -d --hot I get a Uncaught ReferenceError: webpackJsonp is not defined when loading the app. I can not see that a common.js file is being put into my /build folder either. But, if I do this: webpack ./app/main.js --progress --colors (using normal webpack), it builds the common.js file and everything seems to work just fine.
I though maybe this issue might help, but I have not had any luck with it. I was hoping you had some pointers to what I am doing wrong.
Thanks for any help!
is being put into my /build folder either
the dev-server bundles in memory.
Uncaught ReferenceError: webpackJsonp is not defined
You need to include a <script> tag to the common.js file in the HTML.
Aha, that explains it :-) But how to I change the html file launched by
dev-server, it creates this "behind the scenes by default"
Thanks for the help!
On Saturday, December 6, 2014, Tobias Koppers [email protected]
wrote:
is being put into my /build folder either
the dev-server bundles in memory.
Uncaught ReferenceError: webpackJsonp is not defined
You need to include a
Most helpful comment
the dev-server bundles in memory.
You need to include a
<script>tag to thecommon.jsfile in the HTML.