You've already forked bilibili-subtitle
init
This commit is contained in:
29
vite.config.ts
Normal file
29
vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import {defineConfig, PluginOption} from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import {visualizer} from "rollup-plugin-visualizer";
|
||||
import {crx} from '@crxjs/vite-plugin'
|
||||
// @ts-ignore
|
||||
import manifest from './manifest.json'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default ({mode}) => {
|
||||
const plugins = [
|
||||
react(),
|
||||
visualizer() as PluginOption,
|
||||
]
|
||||
// @ts-ignore
|
||||
if (mode === 'production_chrome') {
|
||||
plugins.push(crx({
|
||||
manifest,
|
||||
}))
|
||||
}
|
||||
return defineConfig({
|
||||
base: '/',
|
||||
plugins,
|
||||
css: {
|
||||
modules: {
|
||||
localsConvention: "camelCase"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user