File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ if (entryPoints.length < 1) {
6060 throw new Error ( `No export module found to build at: ${ absWorkingDir } ` )
6161}
6262
63+ const outdir = path . resolve ( absWorkingDir , 'dist' )
64+
6365const ctx = await context ( {
6466 sourceRoot : absWorkingDir ,
6567 entryPoints,
@@ -69,10 +71,11 @@ const ctx = await context({
6971 sourcemap : ! options . production ,
7072 sourcesContent : false ,
7173 platform : 'node' ,
72- outdir : path . resolve ( absWorkingDir , 'dist' ) ,
74+ outdir,
7375 outExtension : { '.js' : '.cjs' } ,
7476 external : [ 'vscode' ] ,
7577 logLevel : 'silent' ,
78+ metafile : true ,
7679 plugins : [
7780 /* add to the end of plugins array */
7881 esbuildProblemMatcherPlugin ,
@@ -81,6 +84,10 @@ const ctx = await context({
8184if ( options . watch ) {
8285 await ctx . watch ( )
8386} else {
84- await ctx . rebuild ( )
87+ const result = await ctx . rebuild ( )
8588 await ctx . dispose ( )
89+
90+ if ( ! options . production ) {
91+ fss . writeFileSync ( path . join ( outdir , 'meta.json' ) , JSON . stringify ( result . metafile ) )
92+ }
8693}
You can’t perform that action at this time.
0 commit comments