You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately this is a unsolvable problem, if I don't add terser-webpack-plugin as dependency in next-pwa. Other folks will see another build error.
Can you try to use {future: webpack5: true} in your project or try install the lower version of terser-webpack-plugin by yarn install terser-webpack-plugin@4.2.3 to mitigate the issue you have encountered?
Summary
I'm using Next.js with Webpack 4 and when I add a fallback page to pages/_offline, terser-webpack-plugin gives the error below:
TypeError: Cannot read property 'javascript' of undefined
at /Users/xxxxxxxxx/node_modules/terser-webpack-plugin/dist/index.js:572:38
I searched for the issue and terser-webpack-plugin@5+ is for Webpack 5 and is not compatible with Webpack 4.
How To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: