new SuppressChunksPlugin([
^
TypeError: SuppressChunksPlugin est pas un constructeur à l'objet. (/Users/rohit/WebstormProjects/myProjectStructure/webpack.config.js:80:9) à Module._compile (module.js: 570: 32) à Object.Module._extensions..js (module.js: 579 : 10) à Module.load (module.js: 487: 32) à tryModuleLoad (module.js: 446: 12) à Function.Module._load (module.js: 438: 3) à Module.require (module.js: 497: 17) at require (internal/module.js: 20: 19) à requireConfig (/usr/local/lib/node_modules/webpack/bin/convert-argv.js:97:18) at /usr/local/lib/node_modules/webpack/bin/convert-argv.js:104:17TypeError: SuppressChunksPlugin n'est pas un constructeur, comment surmonter ce problème?
Vous trouverez ci-dessous les fichiers de configuration Web.
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var SuppressChunksPlugin = require('suppress-chunks-webpack-plugin');
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
blitz: './blitz.js',
},
output: {
path: path.resolve(__dirname, './dist/assets'),
filename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.less$/,
use: ExtractTextPlugin.extract({
// use style-loader in development
fallback: 'style-loader',
use: 'css-loader?minimize!less-loader'
})
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use:'css-loader?minimize'
})
}
]
},
plugins:[
new ExtractTextPlugin('[name].css'),
new SuppressChunksPlugin([
{name: 'blitz', match: /\.js$/},
])
]
};
Pouvez-vous publier votre fichier webpack.config.js? – 83N
Salut, mis à jour avec le fichier de configuration web aussi bien. –