File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import path from 'node:path'
2- import { defineConfig , Plugin , UserConfig } from 'vite'
1+ import { Plugin , mergeConfig } from 'vite'
32import base from './vite.preview.config'
43
54const genStub : Plugin = {
@@ -14,28 +13,22 @@ const genStub: Plugin = {
1413 } ,
1514}
1615
17- export default defineConfig ( {
18- ...base ,
19- plugins : [ ...( base as UserConfig ) . plugins ! , genStub ] ,
16+ export default mergeConfig ( base , {
17+ plugins : [ genStub ] ,
2018 optimizeDeps : {
2119 // avoid late discovered deps
2220 include : [
2321 'path-browserify' ,
2422 'onigasm' ,
2523 'typescript' ,
24+ '@volar/cdn' ,
2625 '@vue/language-service' ,
2726 'monaco-editor-core/esm/vs/editor/editor.worker' ,
2827 '@volar/monaco/worker' ,
2928 'vue/server-renderer' ,
3029 ] ,
3130 } ,
3231 base : './' ,
33- resolve : {
34- alias : {
35- typescript : path . resolve ( __dirname , './empty.js' ) ,
36- path : 'path-browserify' ,
37- } ,
38- } ,
3932 build : {
4033 target : 'esnext' ,
4134 minify : false ,
Original file line number Diff line number Diff line change 1- import path from 'node:path'
21import { defineConfig } from 'vite'
32import vue from '@vitejs/plugin-vue'
43import replace from '@rollup/plugin-replace'
@@ -13,10 +12,14 @@ export default defineConfig({
1312 ] ,
1413 resolve : {
1514 alias : {
16- typescript : path . resolve ( __dirname , './empty.js' ) ,
1715 path : 'path-browserify' ,
1816 } ,
1917 } ,
18+ build : {
19+ commonjsOptions : {
20+ ignore : [ 'typescript' ] ,
21+ } ,
22+ } ,
2023 worker : {
2124 format : 'es' ,
2225 plugins : [
You can’t perform that action at this time.
0 commit comments