-
Notifications
You must be signed in to change notification settings - Fork 23
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
vite.config.js 里按 文档安装后 build 报 vite-plugin-chunk-split/dist/index.cjs not supported.... #43
Comments
Same problem |
Same Problem |
// vite.config.ts
export default defineConfig(async ({ mode }) => {
const env = loadEnv(mode, process.cwd())
const { chunkSplitPlugin } = await import('vite-plugin-chunk-split') Use dynamic import to take effect。 |
// vite.config.ts export default defineConfig(async ({ mode }) => { |
vite版本:"vite": "5.1.4" |
vite 4.0.0
node v17.0.0
配置按 readme 里来的,错误信息如下:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/yangbin/coding/dmail/dmail-server/web/node_modules/import-meta-resolve/index.js from /Users/yangbin/coding/dmail/dmail-server/web/node_modules/vite-plugin-chunk-split/dist/index.cjs not supported.
The text was updated successfully, but these errors were encountered: