medfreeman / swc-plugin-add-import-extension

SWC plugin to add extensions to esm import and export module names

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swc-plugin-add-import-extension

SWC plugin to add extensions to esm import and export module names

๐Ÿ“„ Notes

Need to detect:

  • local imports/exports (not possible w/o node resolver)
  • alias imports/exports (shall we read ts paths?/perhaps better to provide regex in plugin cfg)
  • *baseUrl imports/exports (not possible w/o node resolver + swc still does not support this atm)

๐ŸŽ‰ Contributing

Contributions are welcome! Whether it is a small documentation change or a breaking feature, we welcome it!

Please note: All contributions are taken under the MIT license

โš™๏ธ Development

โ„น๏ธ This project depends on fnm & vscode for a unified development environment.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update
rustup show

fnm use --install-if-missing
corepack enable
pnpm install
code ./swc-plugin-add-import-extension.code-workspace

๐Ÿ‘ฅ Contributors

medfreeman
medfreeman

About

SWC plugin to add extensions to esm import and export module names

License:MIT License


Languages

Language:Rust 83.5%Language:JavaScript 13.3%Language:TypeScript 2.2%Language:Shell 0.9%