Skip to content

Commit

Permalink
Don't minify debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-- authored and Mytherin committed Nov 9, 2023
1 parent 5d8f8ea commit 8734a36
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/duckdb-wasm/bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'cjs',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -124,7 +124,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
globalName: 'duckdb',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -138,7 +138,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'cjs',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: {
Expand All @@ -155,7 +155,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'esm',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_BROWSER,
define: {
Expand All @@ -173,7 +173,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
globalName: 'duckdb',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -188,7 +188,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
globalName: 'duckdb',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -203,7 +203,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
globalName: 'duckdb',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -217,7 +217,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'iife',
target: TARGET_BROWSER,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_WEBWORKER,
define: { 'process.release.name': '"browser"' },
Expand All @@ -235,7 +235,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
globalName: 'duckdb',
target: TARGET_NODE,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});
Expand All @@ -248,7 +248,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'cjs',
target: TARGET_NODE,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});
Expand All @@ -261,7 +261,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'cjs',
target: TARGET_NODE,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});
Expand All @@ -274,7 +274,7 @@ fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist,
format: 'cjs',
target: TARGET_NODE,
bundle: true,
minify: true,
minify: !is_debug,
sourcemap: is_debug ? 'inline' : true,
external: EXTERNALS_NODE,
});
Expand Down

0 comments on commit 8734a36

Please sign in to comment.