File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ jobs:
27
27
- name : Build Pages
28
28
run : |
29
29
npm clean-install
30
- npm run build
30
+ npm run build-demo
31
31
env :
32
32
VITE_BASE_URL : " ${{steps.setup.outputs.base_url}}"
33
33
34
34
- name : Upload Pages Artifact
35
35
uses : actions/upload-pages-artifact@v3
36
36
with :
37
- path : dist
37
+ path : demo
38
38
39
39
- name : Deploy Pages
40
40
uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 10
10
"./style.css" : " ./dist/style.css"
11
11
},
12
12
"scripts" : {
13
- "build" : " npm run check && vite build --mode=demo && vite build --mode=production " ,
13
+ "build" : " npm run check && vite build" ,
14
14
"build-demo" : " npm run check && vite build --mode=demo" ,
15
- "build-lib" : " npm run check && vite build --mode=production" ,
16
15
"check" : " vue-tsc --build --force && vitest run --coverage && eslint" ,
17
16
"deploy-dev" : " wrangler deploy" ,
18
17
"deploy-prod" : " wrangler deploy --env=production" ,
Original file line number Diff line number Diff line change @@ -5,11 +5,17 @@ import { defineConfig } from 'vitest/config'
5
5
6
6
export default defineConfig ( ( env ) => {
7
7
const demo = env . mode === 'demo'
8
- return defineConfig ( {
9
- plugins : [ vue ( ) , svg ( ) , dts ( {
8
+
9
+ const plugins = [ vue ( ) , svg ( ) ]
10
+ if ( ! demo ) {
11
+ plugins . push ( dts ( {
10
12
tsconfigPath : './tsconfig.app.json' ,
11
- rollupTypes : true ,
12
- } ) ] ,
13
+ rollupTypes : ! demo ,
14
+ } ) )
15
+ }
16
+
17
+ return defineConfig ( {
18
+ plugins,
13
19
build : {
14
20
minify : true ,
15
21
sourcemap : true ,
You can’t perform that action at this time.
0 commit comments