How I fixed this error.
- First, disable UglifyJsPlugin from webpack.shared.js
- "jss deploy package"
- Then go to the line specified in the error dist\my-app\server.bundle.js
- You will find what plugin are causing this error
In my case I needed to change my code in webpack.shared.js like this:
{
test: /\.(scss|css)$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
"css-loader", // translates CSS into CommonJS
"sass-loader" // compiles Sass to CSS
]
}),
},
Thanks to @Adam for helping me