-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
styled-component crashed once transformed by swc minifier (trying to replace terser with webpack) #2506
Comments
is |
Getting the same issue with import React from 'react';
import ReactDOM from 'react-dom';
import Loader from 'react-loader-spinner';
ReactDOM.render(<Loader type="BallTriangle"/>, document.getElementById('app'));
|
Sorry, that is a mistake. I just checked again with the fixed code and swc 1.2.103. Same result. |
swc_ecma_minifier: - `hoist_props`: Check for infection. (#2506)
We're facing the same exact issue with TerserPlugin with minify terserPlugin.swcMinify option with |
Describe the bug
First of all: here a "minimal" reproduction repository.
Tested with the latest version of @swc/core (1.2.102).
I'm using the swc minifier with webpack, babel, react and styled-components.
The resulting build crashes when running:
npx webpack
with output (source map off):Switching to terser produces a valid build:
The source file:
I discovered a few other bugs with our medium-sized project. I will share them progressively over time.
My final goal is to pass every specs with swc on.
The text was updated successfully, but these errors were encountered: