vite/vue Top-level await 
npm安装vite-plugin-top-level-await插件
sh
npm install vite-plugin-top-level-await -D配置vite.config.js文件
导入
javascript
import topLevelAwait from 'vite-plugin-top-level-await';在plugins中添加topLevelAwait方法
javascript
plugins: [
  topLevelAwait({
    promiseExportName: '__tla',
    promiseImportName: i => `__tla_${i}`
  })
]最近更新:10/11/2024, 5:06:09 AM
上一篇:display:flex全兼容|下一篇:解决 Windows 10 端口被 Hyper-V 随机保留(占用)的问题