From 6e7fae7c78496b0b2241e2061b35ab22a3b3b186 Mon Sep 17 00:00:00 2001 From: oleh Date: Tue, 26 Nov 2024 03:18:21 +0700 Subject: [PATCH] fix(bb.js): don't minify bb.js - webpack config (#10170) Libraries should not be minified. Minification and bundling is usually done on app end. Unminifying bb.js will allow patching top-level await as a temporary workaround to fix Safari. --- barretenberg/ts/webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/barretenberg/ts/webpack.config.js b/barretenberg/ts/webpack.config.js index d40b5498f81..02e509f256b 100644 --- a/barretenberg/ts/webpack.config.js +++ b/barretenberg/ts/webpack.config.js @@ -3,6 +3,9 @@ import { fileURLToPath } from 'url'; import ResolveTypeScriptPlugin from 'resolve-typescript-plugin'; import webpack from 'webpack'; +/** + * @type {import('webpack').Configuration} + */ export default { target: 'web', mode: 'production', @@ -40,6 +43,9 @@ export default { type: 'module', }, }, + optimization: { + minimize: false, + }, experiments: { outputModule: true, },