Skip to content

Commit

Permalink
Merge pull request #26216 from vector-im/johannes/webpack-cli-4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes authored Oct 25, 2023
2 parents 413c50f + ca24cde commit de2d3ff
Show file tree
Hide file tree
Showing 3 changed files with 424 additions and 616 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down Expand Up @@ -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"
Expand Down
28 changes: 20 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -725,14 +728,23 @@ module.exports = (env, argv) => {

// configuration for the webpack-dev-server
devServer: {
// serve unwebpacked assets from webapp.
contentBase: ["./webapp"],

// Only output errors, warnings, or new compilations.
// This hides the massive list of modules.
stats: "minimal",
hotOnly: true,
inline: true,
static: {
// Where to serve static assets from
directory: "./webapp",
},

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",
},
};
};
Expand Down
Loading

0 comments on commit de2d3ff

Please sign in to comment.