Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"build": "rspack",
"build:prod": "rspack --config ./rspack.prod.config.js",
"build:prod:release": "rspack --config ./rspack.prod.release.config.js",
"clean": "rimraf build && jlpm run clean:static",
"clean:static": "rimraf -g \"../notebook/static/!(favicons)\"",
"watch": "rspack --watch --config rspack.config.js"
Expand Down
2 changes: 1 addition & 1 deletion app/rspack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config[0] = merge(config[0], {
filename: '[name].[contenthash].js?v=[contenthash]',
},
optimization: {
minimize: false,
minimize: true,
},
plugins: [
new WPPlugin.JSONLicenseWebpackPlugin({
Expand Down
14 changes: 14 additions & 0 deletions app/rspack.prod.release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

const merge = require('webpack-merge').default;
const config = require('./rspack.prod.config');

config[0] = merge(config[0], {
// Turn off source maps
devtool: false,
});

module.exports = config;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"build": "lerna run build",
"build:lib": "lerna run build:lib",
"build:prod": "lerna run build:prod --skip-nx-cache",
"build:prod:release": "lerna run build:prod --skip-nx-cache --ignore @jupyter-notebook/app && jlpm workspace @jupyter-notebook/app build:prod:release",
"build:test": "lerna run build:test",
"build:utils": "cd buildutils && npm run build",
"clean": "lerna run clean",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ensured-targets = [
install-pre-commit-hook = true

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
build_cmd = "build:prod:release"
source_dir = "packages"
build_dir = "notebook/static"
npm = ["jlpm"]
Expand All @@ -189,7 +189,7 @@ before-bump-version = [
]
before-build-npm = [
"jlpm clean",
"jlpm build:prod"
"jlpm build:prod:release"
]
before-build-python = [
"jlpm clean"
Expand Down
Loading