Merge pull request #2023 from balena-os/webpack-5

Update to webpack 5
This commit is contained in:
bulldozer-balena[bot] 2022-09-22 21:40:53 +00:00 committed by GitHub
commit d183d0e3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1257 additions and 4412 deletions

5642
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
"@types/chai-like": "^1.1.0", "@types/chai-like": "^1.1.0",
"@types/chai-things": "0.0.34", "@types/chai-things": "0.0.34",
"@types/common-tags": "^1.8.0", "@types/common-tags": "^1.8.0",
"@types/copy-webpack-plugin": "^6.4.3", "@types/copy-webpack-plugin": "^10.1.0",
"@types/dbus": "^1.0.0", "@types/dbus": "^1.0.0",
"@types/dockerode": "^2.5.34", "@types/dockerode": "^2.5.34",
"@types/event-stream": "^3.3.34", "@types/event-stream": "^3.3.34",
@ -71,9 +71,9 @@
"@types/sinon": "^10.0.11", "@types/sinon": "^10.0.11",
"@types/sinon-chai": "^3.2.5", "@types/sinon-chai": "^3.2.5",
"@types/supertest": "^2.0.11", "@types/supertest": "^2.0.11",
"@types/terser-webpack-plugin": "^4.2.2", "@types/terser-webpack-plugin": "^5.2.0",
"@types/tmp": "^0.1.0", "@types/tmp": "^0.1.0",
"@types/webpack": "^4.41.32", "@types/webpack": "^5.28.0",
"@types/yargs": "^15.0.12", "@types/yargs": "^15.0.12",
"balena-register-device": "^8.0.0", "balena-register-device": "^8.0.0",
"blinking": "0.0.5", "blinking": "0.0.5",
@ -84,7 +84,7 @@
"chai-things": "^0.2.0", "chai-things": "^0.2.0",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
"common-tags": "^1.8.0", "common-tags": "^1.8.0",
"copy-webpack-plugin": "^6.4.1", "copy-webpack-plugin": "^11.0.0",
"deep-object-diff": "^1.1.0", "deep-object-diff": "^1.1.0",
"docker-delta": "^2.2.11", "docker-delta": "^2.2.11",
"docker-progress": "^4.0.3", "docker-progress": "^4.0.3",
@ -92,7 +92,7 @@
"duration-js": "^4.0.0", "duration-js": "^4.0.0",
"event-stream": "3.3.4", "event-stream": "3.3.4",
"express": "^4.17.1", "express": "^4.17.1",
"fork-ts-checker-webpack-plugin": "^6.5.2", "fork-ts-checker-webpack-plugin": "^7.2.13",
"fp-ts": "^2.8.1", "fp-ts": "^2.8.1",
"husky": "^8.0.1", "husky": "^8.0.1",
"io-ts": "^2.2.10", "io-ts": "^2.2.10",
@ -124,14 +124,14 @@
"strict-event-emitter-types": "^2.0.0", "strict-event-emitter-types": "^2.0.0",
"supertest": "^6.1.3", "supertest": "^6.1.3",
"tar-stream": "^2.1.3", "tar-stream": "^2.1.3",
"terser-webpack-plugin": "^4.2.3", "terser-webpack-plugin": "^5.3.6",
"tmp": "^0.1.0", "tmp": "^0.1.0",
"ts-loader": "^8.4.0", "ts-loader": "^9.4.0",
"ts-node": "^8.10.2", "ts-node": "^8.10.2",
"tsconfig-paths": "^4.1.0", "tsconfig-paths": "^4.1.0",
"typed-error": "^3.2.1", "typed-error": "^3.2.1",
"typescript": "^4.8.3", "typescript": "^4.8.3",
"webpack": "^4.46.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"winston": "^3.3.3", "winston": "^3.3.3",
"yargs": "^15.4.1" "yargs": "^15.4.1"

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"target": "ES2019", "target": "ES2021",
"module": "commonjs", "module": "commonjs",
"strict": true, "strict": true,
"strictFunctionTypes": false, "strictFunctionTypes": false,
@ -10,7 +10,6 @@
"inlineSourceMap": true, "inlineSourceMap": true,
"outDir": "./build/", "outDir": "./build/",
"skipLibCheck": true, "skipLibCheck": true,
"lib": ["es2019"],
"resolveJsonModule": true, "resolveJsonModule": true,
"allowJs": true, "allowJs": true,
"paths": { "paths": {

View File

@ -21,6 +21,7 @@ var externalModules = [
'tedious', 'tedious',
'dbus', 'dbus',
/mssql\/.*/, /mssql\/.*/,
'osx-temperature-sensor',
]; ];
let requiredModules = []; let requiredModules = [];
@ -70,7 +71,6 @@ console.log('Using the following dependencies as external:', externalModules);
module.exports = function (env) { module.exports = function (env) {
return { return {
mode: env == null || !env.noOptimize ? 'production' : 'development', mode: env == null || !env.noOptimize ? 'production' : 'development',
devtool: 'none',
entry: './src/app.ts', entry: './src/app.ts',
output: { output: {
filename: 'app.js', filename: 'app.js',