Doesn't work on production mode
afifkhaidir-tkpd opened this issue · comments
Khaidir Afif commented
Need help, my Critters plugin doesn't work on production build, but works well on development mode. I am using webpack-dev-server for development.
Here's on my webpack.config.js
:
if (userConfig.html.length !== 0) {
webpackConfig.plugins = webpackConfig.plugins
.concat(userConfig.html.map(htmlConfig => new HtmlWebpackPlugin(htmlConfig)))
.concat([new ScriptExtHtmlWebpackPlugin({ defaultAttribute: 'async' })])
.concat([new CrittersPlugin({})]);
}
This is userConfig
I used for HTML Webpack Plugin:
const config = {
...
html: [
{
template: './src/intro.html',
filename: 'intro/index.html',
chunks: ['intro/intro'],
},
],
...
};
module.exports = config;
And this is my node script to run production build:
NODE_ENV=production webpack -r dotenv/config
Jason Miller commented
What doesn't work about it? Is there an error?
Jason Miller commented
Likely the .split()
error fixed in 2.2.0.
@afifkhaidir-tkpd please re-open if the issue persists after updating to 2.2.0+.