Skip to content

Commit

Permalink
chore: inline sourcemaps in debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ankoh committed Dec 7, 2021
1 parent bfdf5d7 commit ffa9210
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/duckdb-wasm/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: false,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -127,7 +127,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -141,7 +141,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: false,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: {
'process.release.name': '"browser"',
Expand All @@ -158,7 +158,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: {
'process.release.name': '"browser"',
Expand All @@ -176,7 +176,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -191,7 +191,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -206,7 +206,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -220,7 +220,7 @@ esbuild.build({
target: TARGET_BROWSER,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
});
Expand All @@ -238,7 +238,7 @@ esbuild.build({
target: TARGET_NODE,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});

Expand All @@ -251,7 +251,7 @@ esbuild.build({
target: TARGET_NODE,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});

Expand All @@ -264,7 +264,7 @@ esbuild.build({
target: TARGET_NODE,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});

Expand All @@ -277,7 +277,7 @@ esbuild.build({
target: TARGET_NODE,
bundle: true,
minify: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});

Expand All @@ -293,7 +293,7 @@ esbuild.build({
globalName: 'duckdb',
target: TARGET_BROWSER_TEST,
bundle: true,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
});

console.log('[ ESBUILD ] tests-node.cjs');
Expand All @@ -305,7 +305,7 @@ esbuild.build({
target: TARGET_NODE,
bundle: true,
minify: false,
sourcemap: is_debug ? 'both' : true,
sourcemap: is_debug ? 'inline' : true,
// web-worker polyfill needs to be excluded from bundling due to their dynamic require messing with bundled modules
external: [...EXTERNALS_NODE, 'web-worker'],
});
Expand Down

0 comments on commit ffa9210

Please sign in to comment.