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

[v4.0.0] Uglify(Terser) Error with Babel7, typescript, @babel/preset-typescript #2103

Closed
astyfx opened this issue Oct 16, 2018 · 2 comments
Closed

Comments

@astyfx
Copy link

astyfx commented Oct 16, 2018

Environment

System:

  • OS: macOS High Sierra 10.13.3
  • CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  • Memory: 82.66 MB / 16.00 GB
  • Shell: 5.3 - /bin/zsh

Binaries:

  • Node: 10.8.0 - ~/.nvm/versions/node/v10.8.0/bin/node
  • Yarn: 1.10.1 - ~/.yarn/bin/yarn
  • npm: 6.4.1 - ~/.nvm/versions/node/v10.8.0/bin/npm

npmPackages:

  • @types/styled-components: ^4.0.1 => 4.0.1
  • babel-plugin-styled-components: ^1.8.0 => 1.8.0
  • styled-components: ^4.0.0 => 4.0.0

Reproduction

https://github.com/astyfx/styled-bug

Steps to reproduce

  1. Clone above repo
  2. cd app
  3. yarn
  4. yarn build

Expected Behavior

Build Success

Actual Behavior

ERROR in index-a366e6a54d1d10ea3dd3.js from Terser Unexpected token: punc (})

This error only happen when use styled.div

@quantizor
Copy link
Contributor

This line is your issue, has nothing to do with styled-components. https://github.com/astyfx/styled-bug/blob/10a16277793f747dcc7fcff857095d7ec3d9f561/app/webpack.config.js#L91

@astyfx
Copy link
Author

astyfx commented Oct 18, 2018

@probablyup Thanks my mistake sorry for your time

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