g-plane / swc-plugin-vue-jsx

SWC plugin for transforming Vue JSX.
https://www.npmjs.com/package/swc-plugin-vue-jsx
MIT License
94 stars 7 forks source link

thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("H:\\syc-eds-front\\src\\views\\Bus\\component\\NodeState\\index.jsx")' #6

Closed baiyuze closed 11 months ago

baiyuze commented 1 year ago

image

image

The .swcrc configuration is as follows

{
    "isModule": true,
    "sourceMaps": true,
    "inlineSourcesContent": true,
    "jsc": {
        "target": "esnext",
        "parser": {
          "syntax": "ecmascript",
          "jsx": true,
          "dynamicImport": true,
          "privateMethod": true,
          "functionBind": true,
          "exportDefaultFrom": true,
          "exportNamespaceFrom": true,
          "decorators": true,
          "decoratorsBeforeExport": true,
          "topLevelAwait": true,
          "importMeta": true
        },
        "experimental": {
          "plugins": [["swc-plugin-vue-jsx", {
            "transformOn": true,
            "optimize": true
          }]]
        }
    }
  }
    "swc-loader": "^0.2.3",
    "swc-plugin-vue-jsx": "^0.2.5",
    "@swc/core": "^1.3.80"

An error is reported when the relevant route is encountered

g-plane commented 1 year ago

You may need to downgrade SWC to solve this temporarily.

baiyuze commented 1 year ago

您可能需要降级 SWC 来暂时解决此问题。

大概是多少版本呢?

baiyuze commented 1 year ago

How many versions are there?

1.3.68?

g-plane commented 1 year ago

I'm not sure. You can try those released two or three months ago.

baiyuze commented 1 year ago

image I downgrade to 1.3.68 and get an error UFT8, as shown in the figure

g-plane commented 1 year ago

Are you sure this is occurred by this plugin? You can check this by removing this plugin.

baiyuze commented 1 year ago

I used rspack to call swc-loader

g-plane commented 1 year ago

You can remove plugin by modifying your SWC configuration.

baiyuze commented 1 year ago

I'll fork the warehouse, see if I can figure it out

g-plane commented 11 months ago

I can't reproduce with latest SWC version. Maybe this has been fixed. I'll release a new plugin version later and please upgrade SWC (@swc/core) and this plugin to latest.

loilo commented 9 months ago

Unfortunately, this problem re-appears when updating @swc/core from 1.3.105 to 1.3.106.

g-plane commented 9 months ago

You should upgrade to latest SWC. Also, don't reply in closed issue.

loilo commented 9 months ago

Latest SWC 1.3.107 still has this problem. Should I open a new issue?

g-plane commented 9 months ago

Yes.

loilo commented 9 months ago

Sorry for replying again – no new issue is needed. The 0.3.0 version of this plugin you just released today fixes this issue again. Sorry for bothering!