Skip to content
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

domain transform bug #12

Closed
domosedov opened this issue Feb 27, 2024 · 4 comments
Closed

domain transform bug #12

domosedov opened this issue Feb 27, 2024 · 4 comments

Comments

@domosedov
Copy link

domosedov commented Feb 27, 2024

https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/ordinal.js#L21

description

Transform array ['value1', 'value2'] to object like { sid: 'some sid', name: 'domain' }

Reproduce

https://github.com/domosedov/swc-domain-bug

"next": "14.1.0",
"effector-swc-plugin": "0.2.2-swc1.3.63",
"recharts": "^2.12.1",

Reproduce

https://github.com/domosedov/swc-domain-bug

Снимок экрана 2024-02-27 в 09 13 58 Снимок экрана 2024-02-27 в 09 14 31
@domosedov
Copy link
Author

Babel plugin has same problem
Снимок экрана 2024-02-27 в 09 38 55
Снимок экрана 2024-02-27 в 09 39 04

@domosedov
Copy link
Author

Some context

For babel plugin its solve problem

https://github.com/effector/effector/blob/5352b9303f04163a35c9c1cf99cabe515341ae3b/src/babel/babel-plugin.js#L529

{
  "domainMethods": {
    "store": [],
    "event": [],
    "effect": [],
    "domain": []
  }
}

@kireevmp
Copy link
Owner

This now should be covered by transformLegacyDomainMethods option, which you can disable. Can you see if v0.3.0 fixes this for you when using this option?

@domosedov
Copy link
Author

This now should be covered by transformLegacyDomainMethods option, which you can disable. Can you see if v0.3.0 fixes this for you when using this option?

nice, fixed

"next": "14.1.0",
"effector-swc-plugin": "0.3.0-swc1.3.63",
"recharts": "^2.12.1"
/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    swcPlugins: [
      [
        "effector-swc-plugin",
        {
          transformLegacyDomainMethods: false,
        },
      ],
    ],
  },
};

export default nextConfig;

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants