Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next 7 does't work properly on every safari 10 #5630

Closed
sl5310 opened this issue Nov 8, 2018 · 3 comments · Fixed by #6067
Closed

next 7 does't work properly on every safari 10 #5630

sl5310 opened this issue Nov 8, 2018 · 3 comments · Fixed by #6067
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@sl5310
Copy link

sl5310 commented Nov 8, 2018

I have iPhone 5c and iPhone 6 both are iOS 10 and just upgrade my project to next 7 recently.
iPhone 5c was getting error when access to our project
SyntaxError: Cannot declare a let variable twice: 'l'.
already added mangle option eg:
new UglifyJSPlugin({ uglifyOptions: { compress: { drop_console: true }, mangle: { safari10: true } } })
But the problem still existed

System information

  • OS: iOS 10
  • Browser (if applies): Safari & Google Chrome
  • Version of Next.js: 7
@ilionic
Copy link

ilionic commented Nov 8, 2018

you need to pass it to config.optimization.minimizer
Our example ( but using TerserPlugin instead of UglifyJSPlugin )

        if (!isServer && !dev) {
          config.optimization.minimizer = [
            new TerserPlugin({
              parallel: true,
              cache: true,
              sourceMap: true,
              terserOptions: {
                safari10: true,
              },
            }),
          ];
        }

@timneutkens timneutkens added help wanted good first issue Easy to fix issues, good for newcomers labels Dec 31, 2018
@teleginzhenya
Copy link
Contributor

@timneutkens can I work on this issue? Should it works as option flag or add safari10: true for all cases?

@timneutkens
Copy link
Member

Yes @teleginzhenya

timneutkens pushed a commit that referenced this issue Jan 16, 2019
timneutkens pushed a commit to timneutkens/next.js that referenced this issue Jan 17, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants