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

Add swc plugin #118

Closed
mantou132 opened this issue Jan 15, 2024 · 1 comment
Closed

Add swc plugin #118

mantou132 opened this issue Jan 15, 2024 · 1 comment

Comments

@mantou132
Copy link
Owner

mantou132 commented Jan 15, 2024

名字 swc-plugin-gem,也供 vscode plugin 作为命令使用

  • auto import (gbp-sandpack 也要支持) // 如何判断变量有被定义?
    • auto import element // 正则匹配找到字符串模版中使用的元素
      • config rules: [(tag: string) => string ]
    • auto import all '@mantou/gem'
      • generate type // node_modules/@types/gem-auto-import ,不需要 import
      • generate eslint/biome plugin // add global
  • resolve full path
    • add .js or /index.js
  • 编译 @memo() getter 到字段 // 规范不支持私有字段
  • minify css/style
  • 静态资源预加载

考虑中:

  • 自动添加装饰器
    • render -> @template()
    • fallback -> @fallback()
    • mounted -> @mounted()
  • HMR // 添加更新代码
  • SSR // 可延时视图,添加动作记录回放
  • 支持 JSX?
@mantou132 mantou132 changed the title [duoyun-ui] Auto import Add auto import plugin Apr 18, 2024
@mantou132 mantou132 added the enhancement New feature or request label Apr 18, 2024
@mantou132
Copy link
Owner Author

eslint/prettier plugin? support bundless:

@mantou132 mantou132 added plugin and removed enhancement New feature or request labels Aug 23, 2024
@mantou132 mantou132 changed the title Add auto import plugin Add build improve plugin Aug 24, 2024
@mantou132 mantou132 pinned this issue Aug 24, 2024
@mantou132 mantou132 changed the title Add build improve plugin Add swc plugin Sep 2, 2024
@mantou132 mantou132 unpinned this issue Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant