File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
packages/@vue/cli-service/generator Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11module . exports = ( api , options ) => {
22 api . render ( './template' , {
3- doesCompile : api . hasPlugin ( 'babel' ) || api . hasPlugin ( 'typescript' )
3+ doesCompile : api . hasPlugin ( 'babel' ) || api . hasPlugin ( 'typescript' ) ,
4+ useBabel : api . hasPlugin ( 'babel' )
45 } )
56
67 if ( options . vueVersion === '3' ) {
@@ -74,4 +75,9 @@ module.exports = (api, options) => {
7475 if ( options . configs ) {
7576 api . extendPackage ( options . configs )
7677 }
78+
79+ // Delete jsconfig.json when typescript
80+ if ( api . hasPlugin ( 'typescript' ) ) {
81+ api . render ( ( files ) => delete files [ 'jsconfig.json' ] )
82+ }
7783}
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " <%- options.useBabel ? 'esnext' : 'es5' %>" ,
4+ "module" : " esnext" ,
5+ "baseUrl" : " ./" ,
6+ "moduleResolution" : " node" ,
7+ "paths" : {
8+ "@/*" : [
9+ " src/*"
10+ ]
11+ },
12+ "lib" : [
13+ " esnext" ,
14+ " dom" ,
15+ " dom.iterable" ,
16+ " scripthost"
17+ ]
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments