Open bin-dogami opened 4 months ago
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 }) => {
const env = loadEnv(mode, process.cwd())
const { chunkSplitPlugin } = await import('vite-plugin-chunk-split')
这里动态导入会报错:ypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
at Function.all (
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.