Merge pull request #26216 from vector-im/johannes/webpack-cli-4.10.0

This commit is contained in:
Johannes Marbach 2023-10-25 16:47:28 +02:00 committed by GitHub
commit de2d3ff204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 418 additions and 610 deletions

View file

@ -41,14 +41,14 @@
"build:res": "ts-node scripts/copy-res.ts",
"build:genfiles": "yarn build:res && yarn build:jitsi && yarn build:module_system",
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
"build:bundle": "webpack --progress --bail --mode production",
"build:bundle-stats": "webpack --progress --bail --mode production --json > webpack-stats.json",
"build:bundle": "webpack --progress --mode production",
"build:bundle-stats": "webpack --progress --mode production --json > webpack-stats.json",
"build:module_system": "tsc --project ./tsconfig.module_system.json && node ./lib/module_system/scripts/install.js",
"dist": "scripts/package.sh",
"start": "yarn build:module_system && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js --https\"",
"start:res": "yarn build:jitsi && ts-node scripts/copy-res.ts -w",
"start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --mode development --disable-host-check --hot",
"start:js": "webpack serve --output-path webapp --mode development",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "yarn lint:js:src && yarn lint:js:module_system",
"lint:js:src": "eslint --max-warnings 0 src test && prettier --check .",
@ -180,10 +180,10 @@
"ts-node": "^10.9.1",
"ts-prune": "^0.10.3",
"typescript": "5.2.2",
"webpack": "^4.46.0",
"webpack": "^4.47.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"worker-loader": "^3.0.0",
"worklet-loader": "^2.0.0",
"yaml": "^2.0.1"

View file

@ -143,6 +143,9 @@ module.exports = (env, argv) => {
return {
...development,
bail: true,
node: {
// Mock out the NodeFS module: The opus decoder imports this wrongly.
fs: "empty",
@ -725,14 +728,23 @@ module.exports = (env, argv) => {
// configuration for the webpack-dev-server
devServer: {
// serve unwebpacked assets from webapp.
contentBase: ["./webapp"],
static: {
// Where to serve static assets from
directory: "./webapp",
},
// Only output errors, warnings, or new compilations.
// This hides the massive list of modules.
stats: "minimal",
hotOnly: true,
inline: true,
devMiddleware: {
// Only output errors, warnings, or new compilations.
// This hides the massive list of modules.
stats: "minimal",
},
// Enable Hot Module Replacement without page refresh as a fallback in
// case of build failures
hot: "only",
// Disable host check
allowedHosts: "all",
},
};
};

990
yarn.lock

File diff suppressed because it is too large Load diff