Open 12914hh opened 3 months ago
This is My packjson "vite-plugin-top-level-await": "^1.4.1", And this is my vite.config.ts
import { fileURLToPath, URL } from 'node:url' import { defineConfig, loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' import topLevelAwait from 'vite-plugin-top-level-await' import path from 'path' export default defineConfig(({ mode }) => { const env = loadEnv(mode, __dirname) return { define: { 'process.env': env, }, plugins: [ vue({ template: { compilerOptions: { isCustomElement: (tag) => ['swiper-slide', 'swiper-container'].includes(tag), }, }, reactivityTransform: true, }), vueJsx(), topLevelAwait({ // The export name of top-level await promise for each chunk module promiseExportName: '__tla', // The function to generate import names of top-level await promise in each chunk module promiseImportName: (i) => `__tla_${i}`, }), ], base: '/zwr/portal/', // logLevel: 'error', resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, server: { port: 3000, proxy: { ..... }, }, css: { preprocessorOptions: { less: { modifyVars: { hack: `true; @import (reference) "${path.resolve('src/style/index.less')}";`, }, javascriptEnabled: true, }, }, }, } })
But Yesterday ,everythings is ok,And the node_modules has this file。
What can I do for this? Thank you and Best wish~!
I have no idea of it. Could you please provide a reproduction?
This is My packjson "vite-plugin-top-level-await": "^1.4.1", And this is my vite.config.ts
But Yesterday ,everythings is ok,And the node_modules has this file。![image](https://github.com/Menci/vite-plugin-top-level-await/assets/73581391/7c8292af-d1ed-4b00-b96c-323ab6d9c3fe)
What can I do for this? Thank you and Best wish~!