File tree Expand file tree Collapse file tree 3 files changed +28
-20
lines changed Expand file tree Collapse file tree 3 files changed +28
-20
lines changed Original file line number Diff line number Diff line change 33
33
"dev" : " vite" ,
34
34
"build" : " vite build" ,
35
35
"build-types" : " vue-tsc -p tsconfig.build.json && api-extractor run -c api-extractor.json && node scripts/cleanup.js" ,
36
+ "build-preview" : " vite build -c vite.preview.config.ts" ,
36
37
"format" : " prettier --write ." ,
37
38
"release" : " bumpp -r" ,
38
39
"prepublishOnly" : " npm run build && npm run build-types"
Original file line number Diff line number Diff line change 1
- import { defineConfig , Plugin } from 'vite'
2
- import vue from '@vitejs/plugin-vue'
3
- import replace from '@rollup/plugin-replace'
1
+ import { defineConfig , Plugin , UserConfig } from 'vite'
2
+ import base from './vite.preview.config'
4
3
5
4
const genStub : Plugin = {
6
5
name : 'gen-stub' ,
@@ -15,7 +14,8 @@ const genStub: Plugin = {
15
14
}
16
15
17
16
export default defineConfig ( {
18
- plugins : [ vue ( ) , genStub ] ,
17
+ ...base ,
18
+ plugins : [ ...( base as UserConfig ) . plugins ! , genStub ] ,
19
19
optimizeDeps : {
20
20
// avoid late discovered deps
21
21
include : [
@@ -28,22 +28,6 @@ export default defineConfig({
28
28
'vue/server-renderer' ,
29
29
] ,
30
30
} ,
31
- resolve : {
32
- alias : {
33
- path : 'path-browserify' ,
34
- } ,
35
- } ,
36
- worker : {
37
- format : 'es' ,
38
- plugins : [
39
- replace ( {
40
- preventAssignment : true ,
41
- values : {
42
- 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
43
- } ,
44
- } ) ,
45
- ] ,
46
- } ,
47
31
base : './' ,
48
32
build : {
49
33
target : 'esnext' ,
Original file line number Diff line number Diff line change
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import replace from '@rollup/plugin-replace'
4
+
5
+ export default defineConfig ( {
6
+ plugins : [ vue ( ) ] ,
7
+ resolve : {
8
+ alias : {
9
+ path : 'path-browserify' ,
10
+ } ,
11
+ } ,
12
+ worker : {
13
+ format : 'es' ,
14
+ plugins : [
15
+ replace ( {
16
+ preventAssignment : true ,
17
+ values : {
18
+ 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
19
+ } ,
20
+ } ) ,
21
+ ] ,
22
+ } ,
23
+ } )
You can’t perform that action at this time.
0 commit comments