switch to rspack

pull/7787/head
Jeremy Tuloup 5 months ago
parent 95149d7e28
commit e8f2b38cb3

@ -3,11 +3,11 @@
"version": "7.5.1",
"private": true,
"scripts": {
"build": "webpack",
"build:prod": "webpack --config ./webpack.prod.config.js",
"build": "rspack",
"build:prod": "rspack --config ./rspack.prod.config.js",
"clean": "rimraf build && jlpm run clean:static",
"clean:static": "rimraf -g \"../notebook/static/!(favicons)\"",
"watch": "webpack --config ./webpack.config.watch.js"
"watch": "rspack --watch --config rspack.config.js"
},
"resolutions": {
"@codemirror/state": "~6.5.2",
@ -197,20 +197,14 @@
"devDependencies": {
"@jupyterlab/builder": "~4.6.0-alpha.0",
"@jupyterlab/buildutils": "~4.6.0-alpha.0",
"@rspack/cli": "^1.1.8",
"@rspack/core": "^1.1.8",
"@types/rimraf": "^3.0.2",
"css-loader": "~5.0.1",
"extra-watch-webpack-plugin": "^1.0.3",
"fs-extra": "^8.1.0",
"glob": "~7.1.6",
"handlebars": "^4.7.7",
"mini-css-extract-plugin": "~0.9.0",
"rimraf": "^3.0.2",
"style-loader": "~1.0.1",
"svg-url-loader": "~6.0.0",
"watch": "~1.0.2",
"webpack": "^5.76.1",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",
"webpack-merge": "^5.8.0",
"whatwg-fetch": "^3.0.0"
},

@ -2,14 +2,14 @@
// Distributed under the terms of the Modified BSD License.
// Heavily inspired (and slightly tweaked) from:
// https://github.com/jupyterlab/jupyterlab/blob/master/examples/federated/core_package/webpack.config.js
// https://github.com/jupyterlab/jupyterlab/blob/master/examples/federated/core_package/rspack.config.js
const fs = require('fs-extra');
const path = require('path');
const webpack = require('webpack');
const rspack = require('@rspack/core');
const merge = require('webpack-merge').default;
const Handlebars = require('handlebars');
const { ModuleFederationPlugin } = webpack.container;
const { ModuleFederationPlugin } = rspack.container;
const BundleAnalyzerPlugin =
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
@ -94,7 +94,7 @@ const extras = Build.ensureAssets({
});
/**
* Create the webpack ``shared`` configuration
* Create the rspack ``shared`` configuration
*/
function createShared(packageData) {
// Set up module federation sharing config

@ -0,0 +1,15 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/
const base = require('./rspack.config');
module.exports = [
{
...base[0],
bail: false,
watch: true,
},
...base.slice(1),
];

@ -4,7 +4,7 @@
*/
const merge = require('webpack-merge').default;
const config = require('./webpack.config');
const config = require('./rspack.config');
const WPPlugin = require('@jupyterlab/builder').WPPlugin;
config[0] = merge(config[0], {

@ -1,17 +0,0 @@
const base = require('./webpack.config');
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
module.exports = [
{
...base[0],
bail: false,
watch: true,
plugins: [
...base[0].plugins,
new ExtraWatchWebpackPlugin({
files: ['../packages/_metapackage/tsconfig.tsbuildinfo'],
}),
],
},
...base.slice(1),
];

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save