We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TS 的定义和实际的 JS 输出不一致,当我在 vite.config.ts 中使用时,只能通过 vitePluginImp.default 配合 @ts-ignore 使用。
Reproduce: https://stackblitz.com/edit/vitejs-vite-wkqurd?file=vite.config.ts
目前我只能这样用:
import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vitePluginImp from 'vite-plugin-imp' export default defineConfig(({ mode }) => { const IS_DEV = mode === 'development' return { plugins: [ vue(), // @ts-ignore: conflicting type define with default export vitePluginImp.default({}) ] } })
The text was updated successfully, but these errors were encountered:
你删掉package.json中的type: "module"试试
type: "module"
https://stackblitz.com/edit/vitejs-vite-npecb7?file=package.json
Sorry, something went wrong.
删掉之后可以正常工作了,非常感谢!
考虑到未来会有越来越多项目使用 ESM,是否可以在这个项目中兼容一下?例如 vite 在 3.x 开始已经全面开启 ESM,参考 vitejs/vite#8251
@psaren
下个版本会兼容
Awesome! Thanks!
No branches or pull requests
TS 的定义和实际的 JS 输出不一致,当我在 vite.config.ts 中使用时,只能通过 vitePluginImp.default 配合 @ts-ignore 使用。
Reproduce: https://stackblitz.com/edit/vitejs-vite-wkqurd?file=vite.config.ts
目前我只能这样用:
The text was updated successfully, but these errors were encountered: