const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { plugins: [ new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional filename: '[name].css', chunkFilename: '[id].css', }), ], module: { rules: [ { test: /\.css$/, use: [ { loader: MiniCssExtractPlugin.loader, options: { // only enable hot in development hmr: process.env.NODE_ENV === 'development', // if hmr does not work, this is a forceful method. reloadAll: true, }, }, 'css-loader', ], }, ], }, };
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "D:\\nodejs\\node.exe""D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js""start" npm ERR! node v4.0.0-rc.5 npm ERR! npm v2.14.2 npm ERR! code ELIFECYCLE npm ERR! yy-ydh-web@1.0.7 start: `npm run clear&& NODE_ENV=development && webpack-dev-server --host 0.0.0.0 --devtool ev al --progress --color --profile` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yy-ydh-web@1.0.7 start script 'npm run clear&& NODE_ENV=development && webpack-dev-server --host 0.0.0.0 --devtool eval --progress --color --profile'. npm ERR! This is most likely a problem with the yy-ydh-web package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run clear&& NODE_ENV=development && webpack-dev-server --host 0.0.0.0 --devtool eval --progress --color --profile npm ERR! You can get their info via: npm ERR! npm owner ls yy-ydh-web npm ERR! There is likely additional logging output above.