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'
3
2
import base from './vite.preview.config'
4
3
5
4
const genStub : Plugin = {
@@ -14,28 +13,22 @@ const genStub: Plugin = {
14
13
} ,
15
14
}
16
15
17
- export default defineConfig ( {
18
- ...base ,
19
- plugins : [ ...( base as UserConfig ) . plugins ! , genStub ] ,
16
+ export default mergeConfig ( base , {
17
+ plugins : [ genStub ] ,
20
18
optimizeDeps : {
21
19
// avoid late discovered deps
22
20
include : [
23
21
'path-browserify' ,
24
22
'onigasm' ,
25
23
'typescript' ,
24
+ '@volar/cdn' ,
26
25
'@vue/language-service' ,
27
26
'monaco-editor-core/esm/vs/editor/editor.worker' ,
28
27
'@volar/monaco/worker' ,
29
28
'vue/server-renderer' ,
30
29
] ,
31
30
} ,
32
31
base : './' ,
33
- resolve : {
34
- alias : {
35
- typescript : path . resolve ( __dirname , './empty.js' ) ,
36
- path : 'path-browserify' ,
37
- } ,
38
- } ,
39
32
build : {
40
33
target : 'esnext' ,
41
34
minify : false ,
Original file line number Diff line number Diff line change 1
- import path from 'node:path'
2
1
import { defineConfig } from 'vite'
3
2
import vue from '@vitejs/plugin-vue'
4
3
import replace from '@rollup/plugin-replace'
@@ -13,10 +12,14 @@ export default defineConfig({
13
12
] ,
14
13
resolve : {
15
14
alias : {
16
- typescript : path . resolve ( __dirname , './empty.js' ) ,
17
15
path : 'path-browserify' ,
18
16
} ,
19
17
} ,
18
+ build : {
19
+ commonjsOptions : {
20
+ ignore : [ 'typescript' ] ,
21
+ } ,
22
+ } ,
20
23
worker : {
21
24
format : 'es' ,
22
25
plugins : [
You can’t perform that action at this time.
0 commit comments