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

Unexpected token: punc ()) #12

Closed
jairorudas opened this issue Jan 7, 2020 · 1 comment
Closed

Unexpected token: punc ()) #12

jairorudas opened this issue Jan 7, 2020 · 1 comment

Comments

@jairorudas
Copy link

jairorudas commented Jan 7, 2020

Hi!
I cloned the 8 version.
when type yarn run build I get the error above unexpected token punc ()). I tryed find the solution on google, stackoverflow, etc. But no success.

I changed the next.config to target: 'serverless'

Some idea?

@luffyZh
Copy link
Owner

luffyZh commented Jan 8, 2020

@jairorudas

Hi, I just tried it, the error is existing. Looks like a problem with the terser plugin. The following way, I can build successfully, you can try it

// next.config.js
          new TerserPlugin({
            cache: true,
            terserOptions: {
              ecma: undefined, // before is 6
            }
          }),

图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants