swc-project / swc-loader

Moved to https://github.com/swc-project/pkgs
MIT License
394 stars 29 forks source link

Use config { mode: 'usage' } and the core-js path was not found #74

Closed fuwei-1993 closed 1 year ago

fuwei-1993 commented 1 year ago

Issue

Use config { mode: 'usage' } and the corejs path was not found

Version

"@swc/core": "1.3.41",
"@swc/helpers": "0.4.14",
"swc-loader": "0.2.3"

Config

{
    test: /\.(js|jsx)$/,
    include: [/(src)/, /(node_modules(\/|\\)@seeyon)/],
    use: [
      {
        loader: 'swc-loader',
        options: {
          "jsc": {
            "parser": {
                "syntax": "ecmascript",
                "jsx": true,
            },
        },
        "isModule": true,
          "env": {
              "targets": "Chrome >= 65",
              mode: 'usage',
              "coreJs": '3.26.1'
          }
        },
      },
    ],
},

Expected result

img

Actual result

img