chore(build): update build script to not bundle "dependencies"
This commit is contained in:
parent
b9ea9284e7
commit
b89fffc2ed
1 changed files with 4 additions and 0 deletions
|
@ -30,9 +30,12 @@ export default async function build(...args) {
|
||||||
const outdir = 'dist';
|
const outdir = 'dist';
|
||||||
await clean(outdir);
|
await clean(outdir);
|
||||||
|
|
||||||
|
const external = Object.keys(dependencies);
|
||||||
|
|
||||||
if (!isDev) {
|
if (!isDev) {
|
||||||
await esbuild.build({
|
await esbuild.build({
|
||||||
...config,
|
...config,
|
||||||
|
external,
|
||||||
bundle: entryPoints.length === 1, // Note: only use `bundle` with a single entrypoint!
|
bundle: entryPoints.length === 1, // Note: only use `bundle` with a single entrypoint!
|
||||||
entryPoints,
|
entryPoints,
|
||||||
outdir,
|
outdir,
|
||||||
|
@ -44,6 +47,7 @@ export default async function build(...args) {
|
||||||
|
|
||||||
const builder = await esbuild.build({
|
const builder = await esbuild.build({
|
||||||
...config,
|
...config,
|
||||||
|
external,
|
||||||
watch: {
|
watch: {
|
||||||
onRebuild(error, result) {
|
onRebuild(error, result) {
|
||||||
const date = new Date().toISOString();
|
const date = new Date().toISOString();
|
||||||
|
|
Loading…
Reference in a new issue