diff --git a/src/lib/build/index.ts b/src/lib/build/index.ts index 343a9059..d456dd24 100644 --- a/src/lib/build/index.ts +++ b/src/lib/build/index.ts @@ -17,7 +17,7 @@ export async function buildProject( ): Promise> { const esbuild = await getEsbuild(); - const { fs, projectPath, domParser, target } = options; + const { fs, projectPath, domParser, target = "esnext" } = options; const indexHtmlText = await fs.readFile( `${projectPath}/index.html`, @@ -43,7 +43,7 @@ export async function buildProject( bundle: true, write: false, format: "esm", - target: target ?? "esnext", + target, outdir: "/", jsx: "automatic", plugins: [ diff --git a/src/pages/ProjectView.tsx b/src/pages/ProjectView.tsx index 7a7a3381..c23332a0 100644 --- a/src/pages/ProjectView.tsx +++ b/src/pages/ProjectView.tsx @@ -92,7 +92,6 @@ export function ProjectView() { fs: browserFS, projectPath: `/projects/${project.id}`, domParser: new DOMParser(), - target: "esnext", }); console.log(dist);