diff --git a/packages/duckdb-wasm/bundle.mjs b/packages/duckdb-wasm/bundle.mjs index 005371cb5..81b118166 100644 --- a/packages/duckdb-wasm/bundle.mjs +++ b/packages/duckdb-wasm/bundle.mjs @@ -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"' }, @@ -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"' }, @@ -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: { @@ -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: { @@ -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"' }, @@ -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"' }, @@ -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"' }, @@ -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"' }, @@ -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, }); @@ -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, }); @@ -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, }); @@ -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, });