@@ -3,13 +3,14 @@ import fs from 'fs';
33import { resolve } from 'path'
44import { defineConfig } from 'vite'
55import { ViteEjsPlugin } from "vite-plugin-ejs" ;
6+ import { codecovVitePlugin } from "@codecov/vite-plugin" ;
67import vue from '@vitejs/plugin-vue'
78import process from 'process'
89
910/**
1011 * Before actually building the pages with Vite, we do an intermediate build step using ejs
11- * Importing this separately and joining them using ejs
12- * allows us to split some repeating HTML that cannot be added
12+ * Importing this separately and joining them using ejs
13+ * allows us to split some repeating HTML that cannot be added
1314 * by Vue itself (e.g. style/script loading, common meta head tags, Widgetbot)
1415 * The vite-plugin-ejs handles this automatically
1516 */
@@ -49,7 +50,16 @@ export default defineConfig({
4950 }
5051 } ,
5152 base : './' ,
52- plugins : [ vue ( ) , ViteEjsPlugin ( { header } ) ] ,
53+ plugins : [
54+ vue ( ) ,
55+ ViteEjsPlugin ( { header } ) ,
56+ // The Codecov vite plugin should be after all other plugins
57+ codecovVitePlugin ( {
58+ enableBundleAnalysis : process . env . CODECOV_TOKEN !== undefined ,
59+ bundleName : "sunshine" ,
60+ uploadToken : process . env . CODECOV_TOKEN ,
61+ } ) ,
62+ ] ,
5363 root : resolve ( assetsSrcPath ) ,
5464 build : {
5565 outDir : resolve ( assetsDstPath ) ,
0 commit comments