From c1a580323d09a4ffe37ce83d987a6fe3bd297a22 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Tue, 16 Jul 2019 15:02:37 +0200 Subject: [PATCH 1/4] Fix production build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the `TerserPlugin` enabled, the build fails with: ``` ~/.local/share/virtualenvs/project-QesvCi_o/share/jupyter/lab/staging ❯ node yarn.js webpack --config webpack.prod.config.js --progress yarn run v1.15.2 $ /Users/me/.local/share/virtualenvs/project-QesvCi_o/share/jupyter/lab/staging/node_modules/.bin/webpack --config webpack.prod.config.js --progress 97% [0] chunk asset optimization TerserPlugin <--- Last few GCs ---> [88233:0x108000000] 26766 ms: Scavenge 1392.5 (1420.9) -> 1391.9 (1421.9) MB, 2.2 / 0.0 ms (average mu = 0.067, current mu = 0.029) allocation failure <--- JS stacktrace ---> ==== JS stack trace ========================================= 0: ExitFrame [pc: 0x2b3e51fdbe3d] Security context: 0x1b222981e6e9 1: _walk [0x1b2248a66fc1] [/Users/me/.local/share/virtualenvs/project-QesvCi_o/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:~1] [pc=0x2b3e5223920d](this=0x1b225aef3559 ,e=0x1b22c00c09c1 ) 2: /* anonymous */ [0x1b22d2ca1001] [/Users/me/.local/share/virtualenvs/chouke... FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x10003cf99 node::Abort() [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 2: 0x10003d1a3 node::OnFatalError(char const*, char const*) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 3: 0x1001b7835 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 4: 0x100585682 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 5: 0x100588155 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 6: 0x100583fff v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 7: 0x1005821d4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 8: 0x10058ea6c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 9: 0x10058eaef v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 10: 0x10055e434 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 11: 0x1007e6714 v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/me/.asdf/installs/nodejs/10.16.0/bin/node] 12: 0x2b3e51fdbe3d 13: 0x2b3e5223920d 14: 0x2b3e51f918d5 15: 0x2b3e5223a1f7 ``` Even on powerful laptops such as a MacBook Pro with a 2,3 GHz Intel Core i9 and 32 GB 2400 MHz DDR4. The Node.js process would never exit and thus commands like: ``` jupyter labextension install @jupyterlab/plotly-extension --dev-build False ``` would never exit too but without telling why (see https://github.com/jupyterlab/jupyterlab/issues/4276). I've tried a bunch of different terser options but I could not find a combination that would succeed when installing relatively big JupyterLab extensions. So I resort to disabling minification altogether. I think it's better to have a fat production build than no production build at all. --- jupyterlab/staging/package.json | 1 - jupyterlab/staging/webpack.prod.config.js | 22 ++++------------------ jupyterlab/staging/yarn.lock | 2 +- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/jupyterlab/staging/package.json b/jupyterlab/staging/package.json index dfc5d76ba04a..eea50c67d78f 100644 --- a/jupyterlab/staging/package.json +++ b/jupyterlab/staging/package.json @@ -105,7 +105,6 @@ "svg-url-loader": "~2.3.2", "svgo": "~1.2.1", "svgo-loader": "~2.2.0", - "terser-webpack-plugin": "^1.3.0", "url-loader": "~1.1.2", "webpack": "^4.32.2", "webpack-cli": "^3.3.0", diff --git a/jupyterlab/staging/webpack.prod.config.js b/jupyterlab/staging/webpack.prod.config.js index 9f91ed057c35..c6892cffd3bf 100644 --- a/jupyterlab/staging/webpack.prod.config.js +++ b/jupyterlab/staging/webpack.prod.config.js @@ -1,4 +1,3 @@ -const TerserPlugin = require('terser-webpack-plugin'); var merge = require('webpack-merge'); var config = require('./webpack.config'); @@ -6,23 +5,10 @@ config[0] = merge(config[0], { mode: 'production', devtool: 'source-map', optimization: { - minimizer: [ - new TerserPlugin({ - parallel: true, - sourceMap: true, - terserOptions: { - compress: false, - ecma: 6, - mangle: true, - output: { - beautify: false, - comments: false - }, - safari10: true - }, - cache: process.platform !== 'win32' - }) - ] + // As of terser-webpack-plugin@1.3.0, + // the JupyterLab codebase plus its optional extensions is too big to be minified. + // Even with sourceMap and mangling disabled. And even with `node --max_old_space_size=4096`. + minimize: false } }); diff --git a/jupyterlab/staging/yarn.lock b/jupyterlab/staging/yarn.lock index 4e0fdbe58dff..b54daa253d8d 100644 --- a/jupyterlab/staging/yarn.lock +++ b/jupyterlab/staging/yarn.lock @@ -5700,7 +5700,7 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.3" -terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.3.0: +terser-webpack-plugin@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz#69aa22426299f4b5b3775cbed8cb2c5d419aa1d4" integrity sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg== From e70ce007bf70ebfc0ced394f0b68f33bd0f85f37 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Tue, 16 Jul 2019 15:06:48 +0200 Subject: [PATCH 2/4] Default to production build Now that the production build is fixed, I think it's better to default to it. Indeed, we want users installing JupyterLab to have the best experience using the interface and it means running the optimized production build. This is especially true for extensions built with React because in dev mode, they will use the React's development bundle which is known to be much slower than the production one. See also: https://github.com/jupyterlab/jupyterlab/issues/6804#issuecomment-510721047 --- jupyterlab/labapp.py | 4 ++-- jupyterlab/labextensions.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jupyterlab/labapp.py b/jupyterlab/labapp.py index 32bba4f524d0..4ef81e1ca8ae 100644 --- a/jupyterlab/labapp.py +++ b/jupyterlab/labapp.py @@ -61,8 +61,8 @@ class LabBuildApp(JupyterApp, DebugLogFileMixin): version = Unicode('', config=True, help="The version of the built application") - dev_build = Bool(True, config=True, - help="Whether to build in dev mode (defaults to dev mode)") + dev_build = Bool(False, config=True, + help="Whether to build in dev mode (defaults to prod mode)") pre_clean = Bool(False, config=True, help="Whether to clean before building (defaults to False)") diff --git a/jupyterlab/labextensions.py b/jupyterlab/labextensions.py index 09b6802b3b0e..54f8a654c0d9 100644 --- a/jupyterlab/labextensions.py +++ b/jupyterlab/labextensions.py @@ -69,8 +69,8 @@ class BaseExtensionApp(JupyterApp, DebugLogFileMixin): should_build = Bool(True, config=True, help="Whether to build the app after the action") - dev_build = Bool(True, config=True, - help="Whether to build in dev mode (defaults to dev mode)") + dev_build = Bool(False, config=True, + help="Whether to build in dev mode (defaults to prod mode)") should_clean = Bool(False, config=True, help="Whether temporary files should be cleaned up after building jupyterlab") From 7e69eeb17088be1777c035c5db4f08d86fa877ac Mon Sep 17 00:00:00 2001 From: telamonian Date: Mon, 22 Jul 2019 18:40:47 -0400 Subject: [PATCH 3/4] added explicit `minimize` option to lab build --- dev_mode/package.json | 3 +- dev_mode/webpack.prod.minimize.config.js | 29 +++++++++++++++++++ jupyterlab/commands.py | 1 + jupyterlab/labapp.py | 13 ++++++++- jupyterlab/staging/package.json | 3 +- .../staging/webpack.prod.minimize.config.js | 29 +++++++++++++++++++ 6 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 dev_mode/webpack.prod.minimize.config.js create mode 100644 jupyterlab/staging/webpack.prod.minimize.config.js diff --git a/dev_mode/package.json b/dev_mode/package.json index a8c4c4ab2f26..375680a0f81b 100644 --- a/dev_mode/package.json +++ b/dev_mode/package.json @@ -5,7 +5,8 @@ "scripts": { "build": "webpack", "build:prod": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.config.js", - "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.config.js --json > stats.json", + "build:prod:minimize": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js", + "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.minimize.config.js --json > stats.json", "build:stats": "webpack --profile --json > stats.json", "clean": "rimraf build", "prepublishOnly": "npm run build", diff --git a/dev_mode/webpack.prod.minimize.config.js b/dev_mode/webpack.prod.minimize.config.js new file mode 100644 index 000000000000..a4aee1cc7575 --- /dev/null +++ b/dev_mode/webpack.prod.minimize.config.js @@ -0,0 +1,29 @@ +const TerserPlugin = require('terser-webpack-plugin'); +var merge = require('webpack-merge'); +var config = require('./webpack.config'); + +config[0] = merge(config[0], { + mode: 'production', + devtool: 'source-map', + optimization: { + minimizer: [ + new TerserPlugin({ + parallel: false, + sourceMap: true, + terserOptions: { + compress: false, + ecma: 6, + mangle: true, + output: { + beautify: false, + comments: false + }, + safari10: true + }, + cache: process.platform !== 'win32' + }) + ] + } +}); + +module.exports = config; diff --git a/jupyterlab/commands.py b/jupyterlab/commands.py index d2e2c89c638e..36a7388099a2 100644 --- a/jupyterlab/commands.py +++ b/jupyterlab/commands.py @@ -990,6 +990,7 @@ def _populate_staging(self, name=None, version=None, static_url=None, for fname in ['index.js', 'webpack.config.js', 'webpack.prod.config.js', + 'webpack.prod.minimize.config.js', '.yarnrc', 'yarn.js']: target = pjoin(staging, fname) shutil.copy(pjoin(HERE, 'staging', fname), target) diff --git a/jupyterlab/labapp.py b/jupyterlab/labapp.py index 4ef81e1ca8ae..9c7ce84c84c4 100644 --- a/jupyterlab/labapp.py +++ b/jupyterlab/labapp.py @@ -30,6 +30,7 @@ build_aliases['name'] = 'LabBuildApp.name' build_aliases['version'] = 'LabBuildApp.version' build_aliases['dev-build'] = 'LabBuildApp.dev_build' +build_aliases['minimize'] = 'LabBuildApp.minimize' build_aliases['debug-log-path'] = 'DebugLogFileMixin.debug_log_path' build_flags = dict(flags) @@ -64,11 +65,21 @@ class LabBuildApp(JupyterApp, DebugLogFileMixin): dev_build = Bool(False, config=True, help="Whether to build in dev mode (defaults to prod mode)") + minimize = Bool(True, config=True, + help="Whether to use a minifier during the Webpack build (defaults to True). Only affects production builds.") + pre_clean = Bool(False, config=True, help="Whether to clean before building (defaults to False)") def start(self): - command = 'build:prod' if not self.dev_build else 'build' + if self.dev_build: + command = 'build' + else: + if self.minimize: + command = 'build:prod:minimize' + else: + command = 'build:prod' + app_dir = self.app_dir or get_app_dir() self.log.info('JupyterLab %s', version) with self.debug_logging(): diff --git a/jupyterlab/staging/package.json b/jupyterlab/staging/package.json index eea50c67d78f..551179859fe1 100644 --- a/jupyterlab/staging/package.json +++ b/jupyterlab/staging/package.json @@ -5,7 +5,8 @@ "scripts": { "build": "webpack", "build:prod": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.config.js", - "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.config.js --json > stats.json", + "build:prod:minimize": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js", + "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.minimize.config.js --json > stats.json", "build:stats": "webpack --profile --json > stats.json", "clean": "rimraf build", "prepublishOnly": "npm run build", diff --git a/jupyterlab/staging/webpack.prod.minimize.config.js b/jupyterlab/staging/webpack.prod.minimize.config.js new file mode 100644 index 000000000000..a4aee1cc7575 --- /dev/null +++ b/jupyterlab/staging/webpack.prod.minimize.config.js @@ -0,0 +1,29 @@ +const TerserPlugin = require('terser-webpack-plugin'); +var merge = require('webpack-merge'); +var config = require('./webpack.config'); + +config[0] = merge(config[0], { + mode: 'production', + devtool: 'source-map', + optimization: { + minimizer: [ + new TerserPlugin({ + parallel: false, + sourceMap: true, + terserOptions: { + compress: false, + ecma: 6, + mangle: true, + output: { + beautify: false, + comments: false + }, + safari10: true + }, + cache: process.platform !== 'win32' + }) + ] + } +}); + +module.exports = config; From f7f3fb84d23b2dac5f8ed87d6c1dd9c015c7deb5 Mon Sep 17 00:00:00 2001 From: telamonian Date: Mon, 22 Jul 2019 21:40:42 -0400 Subject: [PATCH 4/4] `jupyter lab build` defaults to dev if any linked_packages or local_extensions defaults to prod build otherwise --- dev_mode/package.json | 2 ++ dev_mode/webpack.prod.config.js | 19 +----------------- dev_mode/webpack.prod.minimize.config.js | 2 +- jupyterlab/commands.py | 13 ++++++++++-- jupyterlab/labapp.py | 20 +++++++++---------- jupyterlab/labextensions.py | 18 ++++++++++++++--- jupyterlab/staging/package.json | 3 +++ jupyterlab/staging/webpack.prod.config.js | 3 --- .../staging/webpack.prod.minimize.config.js | 2 +- jupyterlab/staging/yarn.lock | 2 +- 10 files changed, 45 insertions(+), 39 deletions(-) diff --git a/dev_mode/package.json b/dev_mode/package.json index 375680a0f81b..43b00aba1552 100644 --- a/dev_mode/package.json +++ b/dev_mode/package.json @@ -4,6 +4,8 @@ "private": true, "scripts": { "build": "webpack", + "build:dev": "jlpm run build", + "build:dev:minimize": "jlpm run build:dev", "build:prod": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.config.js", "build:prod:minimize": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js", "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.minimize.config.js --json > stats.json", diff --git a/dev_mode/webpack.prod.config.js b/dev_mode/webpack.prod.config.js index 9f91ed057c35..a48980bcdaeb 100644 --- a/dev_mode/webpack.prod.config.js +++ b/dev_mode/webpack.prod.config.js @@ -1,4 +1,3 @@ -const TerserPlugin = require('terser-webpack-plugin'); var merge = require('webpack-merge'); var config = require('./webpack.config'); @@ -6,23 +5,7 @@ config[0] = merge(config[0], { mode: 'production', devtool: 'source-map', optimization: { - minimizer: [ - new TerserPlugin({ - parallel: true, - sourceMap: true, - terserOptions: { - compress: false, - ecma: 6, - mangle: true, - output: { - beautify: false, - comments: false - }, - safari10: true - }, - cache: process.platform !== 'win32' - }) - ] + minimize: false } }); diff --git a/dev_mode/webpack.prod.minimize.config.js b/dev_mode/webpack.prod.minimize.config.js index a4aee1cc7575..9f91ed057c35 100644 --- a/dev_mode/webpack.prod.minimize.config.js +++ b/dev_mode/webpack.prod.minimize.config.js @@ -8,7 +8,7 @@ config[0] = merge(config[0], { optimization: { minimizer: [ new TerserPlugin({ - parallel: false, + parallel: true, sourceMap: true, terserOptions: { compress: false, diff --git a/jupyterlab/commands.py b/jupyterlab/commands.py index 36a7388099a2..62475396870f 100644 --- a/jupyterlab/commands.py +++ b/jupyterlab/commands.py @@ -534,10 +534,19 @@ def install_extension(self, extension, existing=None): return True def build(self, name=None, version=None, static_url=None, - command='build:prod', clean_staging=False): + command='build:prod:minimize', clean_staging=False): """Build the application. """ - self.logger.info('Building jupyterlab assets') + # resolve the build type + parts = command.split(':') + if len(parts) < 2: + parts.append('dev') + elif parts[1] == 'none': + parts[1] = ('dev' if self.info['linked_packages'] or self.info['local_extensions'] else + 'prod') + command = ':'.join(parts) + + self.logger.info(f'Building jupyterlab assets ({command})') # Set up the build directory. app_dir = self.app_dir diff --git a/jupyterlab/labapp.py b/jupyterlab/labapp.py index 9c7ce84c84c4..a79cf8ff7e7b 100644 --- a/jupyterlab/labapp.py +++ b/jupyterlab/labapp.py @@ -62,8 +62,8 @@ class LabBuildApp(JupyterApp, DebugLogFileMixin): version = Unicode('', config=True, help="The version of the built application") - dev_build = Bool(False, config=True, - help="Whether to build in dev mode (defaults to prod mode)") + dev_build = Bool(None, allow_none=True, config=True, + help="Whether to build in dev mode. Defaults to True (dev mode) if there are any locally linked extensions, else defaults to False (prod mode).") minimize = Bool(True, config=True, help="Whether to use a minifier during the Webpack build (defaults to True). Only affects production builds.") @@ -72,13 +72,13 @@ class LabBuildApp(JupyterApp, DebugLogFileMixin): help="Whether to clean before building (defaults to False)") def start(self): - if self.dev_build: - command = 'build' - else: - if self.minimize: - command = 'build:prod:minimize' - else: - command = 'build:prod' + parts = ['build'] + parts.append('none' if self.dev_build is None else + 'dev' if self.dev_build else + 'prod') + if self.minimize: + parts.append('minimize') + command = ':'.join(parts) app_dir = self.app_dir or get_app_dir() self.log.info('JupyterLab %s', version) @@ -88,7 +88,7 @@ def start(self): clean(self.app_dir) self.log.info('Building in %s', app_dir) build(app_dir=app_dir, name=self.name, version=self.version, - command=command, logger=self.log) + command=command, logger=self.log) clean_aliases = dict(base_aliases) diff --git a/jupyterlab/labextensions.py b/jupyterlab/labextensions.py index 54f8a654c0d9..bc5071a2c030 100644 --- a/jupyterlab/labextensions.py +++ b/jupyterlab/labextensions.py @@ -53,8 +53,10 @@ aliases = dict(base_aliases) aliases['app-dir'] = 'BaseExtensionApp.app_dir' aliases['dev-build'] = 'BaseExtensionApp.dev_build' +aliases['minimize'] = 'BaseExtensionApp.minimize' aliases['debug-log-path'] = 'DebugLogFileMixin.debug_log_path' + VERSION = get_app_version() @@ -69,8 +71,11 @@ class BaseExtensionApp(JupyterApp, DebugLogFileMixin): should_build = Bool(True, config=True, help="Whether to build the app after the action") - dev_build = Bool(False, config=True, - help="Whether to build in dev mode (defaults to prod mode)") + dev_build = Bool(None, allow_none=True, config=True, + help="Whether to build in dev mode. Defaults to True (dev mode) if there are any locally linked extensions, else defaults to False (prod mode).") + + minimize = Bool(True, config=True, + help="Whether to use a minifier during the Webpack build (defaults to True). Only affects production builds.") should_clean = Bool(False, config=True, help="Whether temporary files should be cleaned up after building jupyterlab") @@ -81,7 +86,14 @@ def start(self): with self.debug_logging(): ans = self.run_task() if ans and self.should_build: - command = 'build:prod' if not self.dev_build else 'build' + parts = ['build'] + parts.append('none' if self.dev_build is None else + 'dev' if self.dev_build else + 'prod') + if self.minimize: + parts.append('minimize') + command = ':'.join(parts) + build(app_dir=self.app_dir, clean_staging=self.should_clean, logger=self.log, command=command) diff --git a/jupyterlab/staging/package.json b/jupyterlab/staging/package.json index 551179859fe1..a4ebc0c2e2d4 100644 --- a/jupyterlab/staging/package.json +++ b/jupyterlab/staging/package.json @@ -4,6 +4,8 @@ "private": true, "scripts": { "build": "webpack", + "build:dev": "jlpm run build", + "build:dev:minimize": "jlpm run build:dev", "build:prod": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.config.js", "build:prod:minimize": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js", "build:prod:stats": "cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --profile --config webpack.prod.minimize.config.js --json > stats.json", @@ -106,6 +108,7 @@ "svg-url-loader": "~2.3.2", "svgo": "~1.2.1", "svgo-loader": "~2.2.0", + "terser-webpack-plugin": "^1.3.0", "url-loader": "~1.1.2", "webpack": "^4.32.2", "webpack-cli": "^3.3.0", diff --git a/jupyterlab/staging/webpack.prod.config.js b/jupyterlab/staging/webpack.prod.config.js index c6892cffd3bf..a48980bcdaeb 100644 --- a/jupyterlab/staging/webpack.prod.config.js +++ b/jupyterlab/staging/webpack.prod.config.js @@ -5,9 +5,6 @@ config[0] = merge(config[0], { mode: 'production', devtool: 'source-map', optimization: { - // As of terser-webpack-plugin@1.3.0, - // the JupyterLab codebase plus its optional extensions is too big to be minified. - // Even with sourceMap and mangling disabled. And even with `node --max_old_space_size=4096`. minimize: false } }); diff --git a/jupyterlab/staging/webpack.prod.minimize.config.js b/jupyterlab/staging/webpack.prod.minimize.config.js index a4aee1cc7575..9f91ed057c35 100644 --- a/jupyterlab/staging/webpack.prod.minimize.config.js +++ b/jupyterlab/staging/webpack.prod.minimize.config.js @@ -8,7 +8,7 @@ config[0] = merge(config[0], { optimization: { minimizer: [ new TerserPlugin({ - parallel: false, + parallel: true, sourceMap: true, terserOptions: { compress: false, diff --git a/jupyterlab/staging/yarn.lock b/jupyterlab/staging/yarn.lock index b54daa253d8d..4e0fdbe58dff 100644 --- a/jupyterlab/staging/yarn.lock +++ b/jupyterlab/staging/yarn.lock @@ -5700,7 +5700,7 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.3" -terser-webpack-plugin@^1.1.0: +terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz#69aa22426299f4b5b3775cbed8cb2c5d419aa1d4" integrity sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==