Closed SukkaW closed 2 years ago
Hey @SukkaW, sorry for resurrecting a dead issue 😅
Did you manage to get a working setup where SWC support was maintained instead of having to fall back to babel? I've been fighting with the configuration for a few hrs and can't seem to get it to play nicely with each other. If so it'd be awesome if you could share just the webpack part of the next.config
💯
Thanks!
Is your feature request related to a problem? Please describe.
The feature request is similar to #1143.
Next.js 12 internally uses swc based compiler, too. However, in order for
compiled
'sbabel.parseAsync
to recognize tsx files, I need@babel/plugin-syntax-typescript
and@babel/plugin-syntax-jsx
.Currently,
compiled
will let babel load the config through files. But if I supplement a.babelrc
, Next.js will automatically fall back to babel for compiling.In order to leverage Next.js's swc compiler, the absence of any babel configuration file is required.
Describe the solution you'd like
Add
babel
tocompiled-loader
's configuration, so I can provide babel configuration directly, without any.babelrc
files.