Skip to content

Commit e002bfa

Browse files
committed
feat: vulcan.config.js
1 parent fe24a19 commit e002bfa

File tree

6 files changed

+344
-200
lines changed

6 files changed

+344
-200
lines changed

lib/build/bundlers/esbuild/index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { NodeModulesPolyfillPlugin } from './plugins/node-polyfills/index.js';
1010
class Esbuild {
1111
constructor(builderConfig) {
1212
this.builderConfig = builderConfig;
13-
this.customConfig = builderConfig.custom;
13+
this.customConfigPreset = builderConfig.custom;
14+
this.customConfigLocal = builderConfig.localCustom;
1415
}
1516

1617
run = async () => {
@@ -20,14 +21,15 @@ class Esbuild {
2021
AZION_VERSION_ID: JSON.stringify(this.builderConfig.buildId),
2122
};
2223

23-
const hasCustomConfig = Object.keys(this.customConfig).length > 0;
24+
const hasCustomConfig = Object.keys(this.customConfigPreset).length > 0;
2425
if (hasCustomConfig) {
25-
config = merge(this.customConfig, config);
26+
config = merge(this.customConfigPreset, this.customConfigLocal, config);
2627
}
2728

2829
if (
2930
this.builderConfig.useNodePolyfills ||
30-
this.customConfig.useNodePolyfills
31+
this.customConfigPreset.useNodePolyfills ||
32+
this.customConfigLocal
3133
) {
3234
if (!config.plugins) config.plugins = [];
3335

lib/build/bundlers/webpack/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import AzionWebpackConfig from './webpack.config.js';
1010
class Webpack {
1111
constructor(builderConfig) {
1212
this.builderConfig = builderConfig;
13-
this.customConfig = builderConfig.custom;
13+
this.customConfigPreset = builderConfig.custom;
14+
this.customConfigLocal = builderConfig.localCustom;
1415
}
1516

1617
run = async () => {
@@ -25,9 +26,9 @@ class Webpack {
2526
...config.plugins,
2627
];
2728

28-
const hasCustomConfig = Object.keys(this.customConfig).length > 0;
29+
const hasCustomConfig = Object.keys(this.customConfigPreset).length > 0;
2930
if (hasCustomConfig) {
30-
config = merge(this.customConfig, config);
31+
config = merge(this.customConfigPreset, this.customConfigLocal, config);
3132
}
3233

3334
try {

lib/build/bundlers/webpack/webpack.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const outputPath = isWindows
99
: join(projectRoot, '.edge');
1010

1111
export default {
12+
optimization: {
13+
minimize: false,
14+
},
1215
output: {
1316
path: outputPath,
1417
filename: 'worker.js',

0 commit comments

Comments
 (0)