File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
runs-on : ubuntu-latest
16
16
17
+ env :
18
+ VITE_BASE : /ArknightsStoryTextReader/
19
+
17
20
steps :
18
21
- uses : actions/checkout@v2
19
22
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change 1
- import { defineConfig } from 'vite'
1
+ import { defineConfig , loadEnv } from 'vite'
2
2
const { resolve } = require ( 'path' )
3
3
import vue from '@vitejs/plugin-vue'
4
4
5
5
// https://vitejs.dev/config/
6
- export default defineConfig ( {
6
+ export default defineConfig ( ( { command, mode} ) => {
7
+
8
+ const env = loadEnv ( mode , process . cwd ( ) , '' )
9
+ var base = env . VITE_BASE ;
10
+ if ( ! base ) {
11
+ base = '/' ;
12
+ }
13
+
14
+ return {
7
15
plugins : [ vue ( ) ] ,
8
- base : '/ArknightsStoryTextReader/' ,
16
+ base : base ,
9
17
build : {
10
18
rollupOptions : {
11
19
input : {
@@ -22,4 +30,4 @@ export default defineConfig({
22
30
strict :false
23
31
}
24
32
}
25
- } )
33
+ } } )
You can’t perform that action at this time.
0 commit comments