My current project fails when building npm run build.
As a test I made a new project and built it. It also fails.
> create-razzle-app myrazzle
> cd myrazzle
> yarn build
yarn run v1.9.4
$ razzle build
Creating an optimized production build...
Compiling client...
Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
Compiled client successfully.
Compiling server...
Failed to compile.
server.js from Terser
TypeError: Cannot read property 'minify' of undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
You can try this workaround (tested):
https://github.com/webpack-contrib/terser-webpack-plugin/issues/66
Thanks @bezugen, it worked!
Most helpful comment
You can try this workaround (tested):
https://github.com/webpack-contrib/terser-webpack-plugin/issues/66