Answer the question
In order to leave comments, you need to log in
webpack. How to fix Chunk.entry was removed. Use hasRuntime()?
/home/projects/Game/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.get entry [as entry] (/home/projects/Game/node_modules/webpack/lib/Chunk.js:59:9)
at /home/projects/Game/node_modules/extract-text-webpack -plugin/index.js:201:13
at Array.filter (native)
at Compilation. (/home/projects/Game/node_modules/extract-text-webpack-plugin/index.js:200:37)
at Compilation.applyPlugins0 (/home/projects/Game/node_modules/tapable/lib/Tapable.js:68: 14)
at Compilation.seal (/home/projects/Game/node_modules/webpack/lib/Compilation.js:558:8)
at /home/projects/Game/node_modules/webpack/lib/Compiler.js:474:16
at /home/projects/Game/node_modules/tapable/lib/Tapable.js:225:11
at _addModuleChain (/home/projects/ Game/node_modules/webpack/lib/Compilation.js:472:11)
at processModuleDependencies.err (/home/projects/Game/node_modules/webpack/lib/Compilation.js:443:13)
at _combinedTickCallback (internal/process/next_tick .js:67:7)
at process._tickCallback(internal/process/next_tick.js:98:9)
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
const extractCSS = new ExtractTextPlugin('./public/stylesheets/[name].css');
const extractLESS = new ExtractTextPlugin('./public/stylesheets/[name].less');
module.exports = {
context: path.join(__dirname, 'frontend'),
entry: {
style: 'stylesheets/style.less',
babelPolyfill: "babel-polyfill",
ReactIgnore: "./ReactIgnore",
App: "./App",
index: "./index.js",
initialState: "./initialState.js",
},
output: {
path: path.join(__dirname, 'public'),
filename: '[path][name].[ext]',
publicPath: '/public/',
library: '[name]'
},
resolve: {
modules: [path.resolve(__dirname, "node_modules")]
},
resolveLoader: {
modules: ["web_loaders", "web_modules", "node_loaders", "node_modules"],
},
module: {
rules: [
{
exclude: /\/node_modules/,
loader: "babel-loader",
options: {
presets: [['es2015', {modules: false}], "es2016", "es2017", "react"],
plugins: ['transform-runtime'],
},
},
{
test: /\.less$/,
use: extractLESS.extract(["css-loader", "less-loader"]
},
{
test: /\.css$/,
use: extractCSS.extract(["css-loader"]),
},
{
test: /\.(png|jpg|svg|ttf|eot|woff|woff2)$/,
use: "file?name=[path][name].[ext]",
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery",
}),
new webpack.NoEmitOnErrorsPlugin(),
extractLESS,
extractCSS,
],
watch: true,
}
use: ExtractTextPlugin.extract(
{
fallback: "style-loader",
use: ["css-loader","autoprefixer-loader?browsers=last 2 versions","less-loader"],
publicPath: "./public/stylesheets",
}),
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract(
{
fallback: "style-loader",
use: ["css-loader","autoprefixer-loader?browsers=last 2 versions"],
publicPath: "./public/stylesheets",
}),
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question