@@ -4,12 +4,13 @@ const fs = require('fs');
44
55require ( 'esbuild' ) . context ( {
66 entryPoints : {
7- client : './out/nodeClientMain.js' ,
8- server : './node_modules/@vue/language-server/bin/vue-language-server.js' ,
7+ 'dist/client' : './out/nodeClientMain.js' ,
8+ 'dist/server' : './node_modules/@vue/language-server/bin/vue-language-server.js' ,
9+ 'node_modules/typescript-vue-plugin-bundle/index' : './node_modules/@vue/typescript-plugin/index.js' ,
910 } ,
1011 bundle : true ,
1112 metafile : process . argv . includes ( '--metafile' ) ,
12- outdir : './dist ' ,
13+ outdir : '.' ,
1314 external : [ 'vscode' ] ,
1415 format : 'cjs' ,
1516 platform : 'node' ,
@@ -62,34 +63,3 @@ require('esbuild').context({
6263 console . log ( 'finished.' ) ;
6364 }
6465} )
65-
66- require ( 'esbuild' ) . context ( {
67- entryPoints : [ './node_modules/@vue/typescript-plugin/index.js' ] ,
68- bundle : true ,
69- outfile : './node_modules/typescript-vue-plugin-bundle/index.js' ,
70- external : [ 'vscode' ] ,
71- format : 'cjs' ,
72- platform : 'node' ,
73- tsconfig : './tsconfig.json' ,
74- minify : process . argv . includes ( '--minify' ) ,
75- plugins : [ {
76- name : 'umd2esm' ,
77- setup ( build ) {
78- build . onResolve ( { filter : / ^ ( v s c o d e - .* - l a n g u a g e s e r v i c e | j s o n c - p a r s e r ) / } , args => {
79- const pathUmdMay = require . resolve ( args . path , { paths : [ args . resolveDir ] } )
80- const pathEsm = pathUmdMay . replace ( '/umd/' , '/esm/' )
81- return { path : pathEsm }
82- } )
83- } ,
84- } ] ,
85- } ) . then ( async ctx => {
86- console . log ( 'building...' ) ;
87- if ( process . argv . includes ( '--watch' ) ) {
88- await ctx . watch ( ) ;
89- console . log ( 'watching...' ) ;
90- } else {
91- await ctx . rebuild ( ) ;
92- await ctx . dispose ( ) ;
93- console . log ( 'finished.' ) ;
94- }
95- } )
0 commit comments