Configure plugin for vite

This commit is contained in:
Kenny628 2023-08-27 18:26:48 +08:00
parent f1303483f3
commit 8e1efa69b0
2 changed files with 13548 additions and 1 deletions

13540
.nyc_output/out.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@ import { fileURLToPath, URL } from 'url'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import analyzer from 'rollup-plugin-analyzer'
import istanbul from 'vite-plugin-istanbul'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
@ -13,5 +13,12 @@ export default defineConfig({
plugins: [
vue(),
analyzer({ summaryOnly: true }),
istanbul({
include: 'src/*',
exclude: ['node_modules'],
extension: ['.js', '.ts', '.vue'],
requireEnv: false,
forceBuildInstrument: Boolean(process.env.INSTRUMENT_BUILD)
}),
],
})