This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
swc-loader
seems to ignore .browserslistrc
#37
Comments
Is your webpack file not at root level? I'm having the same issue when my configuration is in a subfolder even when using the |
@vgurkov I am having the same issue even if I put |
@SukkaW All my other loaders can pick up const packageJson = require('../package.json'); ...
loader: 'swc-loader',
options: {
...
env: {
targets: packageJson.browserslist,
... |
Is the target option provided by the |
Why do you need to left a comment? Issue is not closed |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Installed Versions
The output of
swc-loader
is different between these two configurations:webpack.config.ts (partial)
.browserslistrc
webpack.config.ts (partial)
Option 1 results in es2015 output whereas option 2 uses the browserslist query correctly and results in the expected output.
As a side question, would
@swc/jest
also have the same issue?Thanks!
The text was updated successfully, but these errors were encountered: