Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b50e9a

Browse files
committed
fix esbuild config setup
1 parent 5ba702d commit 4b50e9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tasks/util/bundle_wrapper.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { build } from 'esbuild';
22

3-
import config from '../../esbuild-config.mjs';
3+
import esbuildConfig from '../../esbuild-config.mjs';
44
import browserifyAdapter from 'esbuild-plugin-browserify-adapter';
55

66
import transform from '../../tasks/compress_attributes.js';
@@ -25,11 +25,13 @@ import transform from '../../tasks/compress_attributes.js';
2525
export default async function _bundle(pathToIndex, pathToBundle, opts, cb) {
2626
opts = opts || {};
2727

28+
var config = {...esbuildConfig};
29+
2830
config.entryPoints = [pathToIndex];
2931
config.outfile = pathToBundle || pathToMinBundle;
3032
if(!opts.noCompressAttributes) config.plugins.push(browserifyAdapter(transform));
31-
if(opts.noPlugins) config.plugins = [];
3233

34+
if(opts.noPlugins) config.plugins = [];
3335
var pathToMinBundle = opts.pathToMinBundle;
3436
var pending = (pathToMinBundle && pathToBundle) ? 2 : 1;
3537

0 commit comments

Comments
 (0)