chore(build): update build script to not bundle "dependencies"

This commit is contained in:
Nate Moore 2021-10-07 17:15:22 -05:00
parent b9ea9284e7
commit b89fffc2ed

View file

@ -30,9 +30,12 @@ export default async function build(...args) {
const outdir = 'dist';
await clean(outdir);
const external = Object.keys(dependencies);
if (!isDev) {
await esbuild.build({
...config,
external,
bundle: entryPoints.length === 1, // Note: only use `bundle` with a single entrypoint!
entryPoints,
outdir,
@ -44,6 +47,7 @@ export default async function build(...args) {
const builder = await esbuild.build({
...config,
external,
watch: {
onRebuild(error, result) {
const date = new Date().toISOString();