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 3333 "dev" : " vite" ,
3434 "build" : " vite build" ,
3535 "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" ,
3637 "format" : " prettier --write ." ,
3738 "release" : " bumpp -r" ,
3839 "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'
43
54const genStub : Plugin = {
65 name : 'gen-stub' ,
@@ -15,7 +14,8 @@ const genStub: Plugin = {
1514}
1615
1716export default defineConfig ( {
18- plugins : [ vue ( ) , genStub ] ,
17+ ...base ,
18+ plugins : [ ...( base as UserConfig ) . plugins ! , genStub ] ,
1919 optimizeDeps : {
2020 // avoid late discovered deps
2121 include : [
@@ -28,22 +28,6 @@ export default defineConfig({
2828 'vue/server-renderer' ,
2929 ] ,
3030 } ,
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- } ,
4731 base : './' ,
4832 build : {
4933 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