lib/generators/rocket_cms/templates/webpack.config.js in rocket_cms-0.21.0 vs lib/generators/rocket_cms/templates/webpack.config.js in rocket_cms-0.21.1

- old
+ new

@@ -14,18 +14,17 @@ var devServerPort = 3808; var production = process.env.NODE_ENV === 'production'; const extractSass = new ExtractTextPlugin({ - filename: "[name].[contenthash].css", - disable: !production + filename: production ? "[name].[contenthash].css" : "[name].css", }); //console.log("dir:", __dirname) var sassExtractor = () => { - return extractSass.extract({ + return ['css-hot-loader'].concat(extractSass.extract({ use: [{ loader: "css-loader", options: { sourceMap: true } @@ -34,11 +33,11 @@ options: { sourceMap: true } }], fallback: "style-loader" - }) + })); } var config = { entry: { // Sources are expected to live in $app_root/webpack @@ -130,9 +129,10 @@ new webpack.NamedModulesPlugin() ) config.devServer = { port: devServerPort, + disableHostCheck: true, headers: { 'Access-Control-Allow-Origin': '*' }, }; config.output.publicPath = 'http://' + host + ':' + devServerPort + '/webpack/'; config.devtool = 'source-map'; }