接口初始化 第一版

This commit is contained in:
yuping
2022-11-21 14:52:14 +08:00
parent 7636f00982
commit cd874c0373
3 changed files with 421 additions and 226 deletions

View File

@@ -2,6 +2,7 @@ import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import legacy from '@vitejs/plugin-legacy'
import {viteMockServe} from 'vite-plugin-mock'
import topLevelAwait from "vite-plugin-top-level-await";
const path = require('path')
@@ -9,8 +10,12 @@ export default defineConfig(({command}) =>
({
plugins: [
vue(),
legacy({
targets: ['chrome 52', 'defaults', 'not IE 11']
// legacy({
// targets: ['chrome 64', 'defaults', 'not IE 11']
// }),
topLevelAwait({
promiseExportName: '__tla',
promiseImportName: i => `__tla_${i}`
}),
viteMockServe({
mockPath: './src/mock/mocks',