Refactor(compiler): Change esbuild transform and compile target to es2015
This commit is contained in:
@@ -58,7 +58,7 @@ class Compiler {
|
|||||||
|
|
||||||
transform = async (code: string, loader: Loader) => {
|
transform = async (code: string, loader: Loader) => {
|
||||||
await this.waitInit()
|
await this.waitInit()
|
||||||
return esbuild.transform(code, { loader })
|
return esbuild.transform(code, { loader, target: 'es2015' })
|
||||||
}
|
}
|
||||||
|
|
||||||
compile = async (files: IFiles, importMap: IImportMap, entryPoint: string) => {
|
compile = async (files: IFiles, importMap: IImportMap, entryPoint: string) => {
|
||||||
@@ -67,6 +67,7 @@ class Compiler {
|
|||||||
bundle: true,
|
bundle: true,
|
||||||
entryPoints: [entryPoint],
|
entryPoints: [entryPoint],
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
|
target: 'es2015',
|
||||||
metafile: true,
|
metafile: true,
|
||||||
write: false,
|
write: false,
|
||||||
plugins: [this.fileResolverPlugin(files, importMap)]
|
plugins: [this.fileResolverPlugin(files, importMap)]
|
||||||
|
|||||||
Reference in New Issue
Block a user