-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
Description
Thanks for working on this component. It looks like it going to be very handy.
I'm running into issue on production build with uglifyjs.
It only happens for production build.
My config
//package.json
"build": "NODE_ENV=production webpack --config src/config/webpack.config.prod.js -p",
//webpack.config.prod.js
entry: {
vendor,
app: ['babel-polyfill', `${SRC}/styles/app.scss`, `${SRC}/client-entry.js`]
},
module: {
loaders: [
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.jsx?$/,
include: [/src/],
loader: 'babel',
query: {
plugins: [
[
'code-split-component/babel',
{
disabled: false
}
]
]
}
},
...
prodConfig.module.loaders.push({
test: /\.jsx?$/, loader: WebpackStrip.loader('console.log', 'console.debug')
});
prodConfig.plugins.push(new CodeSplitPlugin());
Gives
ERROR in vendor.ce7455f2b338600395b1.js from UglifyJs
SyntaxError: Unexpected token num «820075192», expected punc «:» [webpack/bootstrap 6f7c862bd7fb36d95dc3:55,0][vendor.ce7455f2b338600395b1.js:56,12]
for reference
// vendor has
module.exports = [
'debug',
'react',
'react-dom',
'react-helmet',
'react-redux',
'redux',
...
]
Have no issues without prodConfig.plugins.push(new CodeSplitPlugin());
Reactions are currently unavailable