File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed
Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,13 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
1717// vue.config.js
1818let vueConfig : VueCliOptions = { }
1919try {
20- vueConfig = require ( resolve ( process . env . CLI_CONFIG_FILE || 'vue.config.js' ) ) || { }
20+ /**
21+ * @see {@link https://github.com/vuejs/vue-cli/commit/f5b174ff7981a8e882c1275dda65964b3f3d666c }
22+ */
23+ const maybeFn = require ( resolve ( process . env . CLI_CONFIG_FILE || 'vue.config.js' ) )
24+ vueConfig = typeof maybeFn === 'function' ? maybeFn ( ) : maybeFn
2125} catch ( e ) {
22- // handle no vue.config.js
26+ vueConfig = { }
2327 if ( e . code === 'MODULE_NOT_FOUND' ) {
2428 if ( process . env . VITE_DEBUG ) {
2529 console . error ( chalk . redBright ( e ) )
2832 console . error ( chalk . redBright ( e . stack ?? e ) )
2933 }
3034}
35+ if ( process . env . VITE_DEBUG ) {
36+ console . log ( vueConfig )
37+ }
3138
3239/**
3340 * @see {@link https://github.com/vuejs/vue-cli/blob/aad72cfa7880a0e327be06b3b9c3ac3d3b3c9abc/packages/%40vue/babel-preset-app/index.js#L124 }
Original file line number Diff line number Diff line change 1- module . exports = {
2- lintOnSave : process . env . NODE_ENV !== 'production' ,
3- devServer : {
4- overlay : false ,
5- } ,
1+ module . exports = ( ) => {
2+ return {
3+ lintOnSave : process . env . NODE_ENV !== 'production' ,
4+ devServer : {
5+ overlay : false ,
6+ } ,
7+ pluginOptions : {
8+ vite : {
9+ disabledTypeChecker : true ,
10+ } ,
11+ }
12+ }
613}
You can’t perform that action at this time.
0 commit comments