Add compile to ToolBase management page

This commit is contained in:
2024-01-23 15:32:15 +08:00
parent e2d2710823
commit 2e331658c5
8 changed files with 276 additions and 91 deletions

View File

@@ -39,7 +39,7 @@ class Compiler {
return esbuild.transform(code, { loader })
})
compile = (files: IFiles, importMap: IImportMap) =>
compile = (files: IFiles, importMap: IImportMap, entryPoints: string[]) =>
new Promise<void>((resolve) => {
if (this.init) {
resolve()
@@ -54,7 +54,7 @@ class Compiler {
}).then(() => {
return esbuild.build({
bundle: true,
entryPoints: [ENTRY_FILE_NAME],
entryPoints: entryPoints,
format: 'esm',
metafile: true,
write: false,