Esbuild, don't mark everything as external

This commit is contained in:
Adria Navarro 2023-06-08 17:45:45 +01:00
parent 4c8b430bd9
commit 99b4cf9b41
1 changed files with 13 additions and 14 deletions

View File

@ -25,25 +25,24 @@ function runBuild(entry, outfile) {
minify: !isDev,
sourcemap: isDev,
tsconfig,
plugins: [
TsconfigPathsPlugin({ tsconfig }),
NodeResolve({
extensions: [".ts", ".js"],
onResolved: resolved => {
if (resolved.includes("node_modules") && !resolved.includes("/@budibase/pro/")) {
return {
external: true,
}
}
return resolved
},
}),
],
plugins: [TsconfigPathsPlugin({ tsconfig })],
target: "node14",
preserveSymlinks: true,
loader: {
".svelte": "copy",
},
external: [
"deasync",
"mock-aws-s3",
"nock",
"lerna",
"dd-trace",
"pg",
"@bull-board/koa",
"koa2-ratelimit",
"fsevents",
"knex",
],
}
build({