Добрый вечер! При работе с webpack решил использовать extract-text-webpack-plugin. Но столкнулся с ошибкой. Сперва запрос был на какой - то 'emojis-list' module. После того как сделал npm i emojis-list, появилась другая ошибка:
C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Chunk.js:59
throw new Error("Chunk.entry was removed. Use hasRuntime()");
^
Error: Chunk.entry was removed. Use hasRuntime()
at Chunk.entry (C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Chunk.js:59:9)
at C:\WebServers\home\learn-webpack\www\node_modules\extract-text-webpack-plugin\index.js:201:13
at Array.filter (native)
at Compilation. (C:\WebServers\home\learn-webpack\www\node_modules\extract-text-webpack-plugin\index.js:200:37)
at Compilation.applyPlugins0 (C:\WebServers\home\learn-webpack\www\node_modules\tapable\lib\Tapable.js:68:14)
at Compilation.seal (C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Compilation.js:558:8)
at C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Compiler.js:474:16
at C:\WebServers\home\learn-webpack\www\node_modules\tapable\lib\Tapable.js:225:11
at C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Compilation.js:472:11
at C:\WebServers\home\learn-webpack\www\node_modules\webpack\lib\Compilation.js:443:13
at nextTickCallbackWith0Args (node.js:433:9)
at process._tickCallback (node.js:362:13)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v5.2.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! webpack_learn@1.0.0 build: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack_learn@1.0.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webpack_learn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get their info via:
npm ERR! npm owner ls webpack_learn
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\WebServers\home\learn-webpack\www\npm-debug.log
Вот конфиг. файл для вебпака:
var webpack = require('webpack');
var NODE_ENV = process.env.NODE_ENV || 'development';
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: __dirname + '/js/src',
entry: {
main: './main.js',
about: './about.js'
},
output: {
path: __dirname + '/js/dist',
publicPath: '/js/dist/',
filename: "[name].js",
chunkFilename: '[id].[name].js',
library: '[name]'
},
watch: NODE_ENV == 'development',
watchOptions: {
aggregateTimeout: 100
},
devtool: NODE_ENV == 'development' ? 'cheap-inline-module-source-map' : false,
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.json']
},
resolveLoader: {
modules: ['node_modules'],
moduleExtensions: ['-loader'],
extensions: ['.js', '.json']
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel'
},
{
test:/\.less$/,
loader: ExtractTextPlugin.extract('css!less?resolve url')
}
]
},
plugins: [
new ExtractTextPlugin('app.css', { allChunks: true }),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.CommonsChunkPlugin({
name: 'common',
chunks: ['main', 'about']
}),
new webpack.DefinePlugin({
NODE_ENV: JSON.stringify(NODE_ENV),
LANG: JSON.stringify('ru')
})
]
};
if(NODE_ENV == 'production') {
module.exports.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
drop_console: true,
unsafe: true
}
})
);
}
Подскажите в чем может быть проблема, пожалуйста.
Как можно решить