mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
INFRA: Update Webpack to @latest, along with other dev packages (#290)
This commit is contained in:
parent
a76e281349
commit
c42fde9379
15069
package-lock.json
generated
15069
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -52,7 +52,7 @@
|
|||||||
"@babel/preset-typescript": "^7.15.0",
|
"@babel/preset-typescript": "^7.15.0",
|
||||||
"@microsoft/api-documenter": "^7.13.65",
|
"@microsoft/api-documenter": "^7.13.65",
|
||||||
"@microsoft/api-extractor": "^7.18.17",
|
"@microsoft/api-extractor": "^7.18.17",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
||||||
"@testing-library/cypress": "^8.0.1",
|
"@testing-library/cypress": "^8.0.1",
|
||||||
"@types/acorn": "^4.0.6",
|
"@types/acorn": "^4.0.6",
|
||||||
"@types/bcryptjs": "^2.4.2",
|
"@types/bcryptjs": "^2.4.2",
|
||||||
@ -69,28 +69,28 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||||
"@typescript-eslint/parser": "^5.20.0",
|
"@typescript-eslint/parser": "^5.20.0",
|
||||||
"babel-jest": "^27.0.6",
|
"babel-jest": "^27.0.6",
|
||||||
"babel-loader": "^8.0.5",
|
"babel-loader": "^9.1.0",
|
||||||
"cypress": "^8.3.1",
|
"cypress": "^8.3.1",
|
||||||
"electron": "^14.2.4",
|
"electron": "^14.2.4",
|
||||||
"electron-packager": "^15.4.0",
|
"electron-packager": "^15.4.0",
|
||||||
"eslint": "^8.13.0",
|
"eslint": "^8.13.0",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"fork-ts-checker-webpack-plugin": "^6.3.3",
|
"fork-ts-checker-webpack-plugin": "^6.3.3",
|
||||||
"html-webpack-plugin": "^4.5.2",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"http-server": "^13.0.1",
|
"http-server": "^13.0.1",
|
||||||
"jest": "^27.1.0",
|
"jest": "^27.1.0",
|
||||||
"jsdom": "^16.5.0",
|
"jsdom": "^16.5.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mini-css-extract-plugin": "^0.4.1",
|
"mini-css-extract-plugin": "^2.7.2",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
"react-refresh": "^0.10.0",
|
"react-refresh": "^0.14.0",
|
||||||
"source-map": "^0.7.3",
|
"source-map": "^0.7.3",
|
||||||
"start-server-and-test": "^1.14.0",
|
"start-server-and-test": "^1.14.0",
|
||||||
"typescript": "^4.2.4",
|
"typescript": "^4.2.4",
|
||||||
"webpack": "^4.46.0",
|
"webpack": "^5.75.0",
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^5.0.1",
|
||||||
"webpack-dev-server": "^3.11.2"
|
"webpack-dev-server": "^4.11.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
@ -110,9 +110,9 @@
|
|||||||
"format:report": "prettier -c .",
|
"format:report": "prettier -c .",
|
||||||
"format:report-diff": "bash -c 'if [[ $(git diff --name-only --diff-filter=ACMRTUXB origin/dev | grep -E \"(.js$|.jsx$|.ts$|.tsx$)\" | wc -c) -ne 0 ]]; then prettier -c $(git diff --name-only --diff-filter=ACMRTUXB origin/dev | grep -E \"(.js$|.jsx$|.ts$|.tsx$)\" | xargs); fi'",
|
"format:report-diff": "bash -c 'if [[ $(git diff --name-only --diff-filter=ACMRTUXB origin/dev | grep -E \"(.js$|.jsx$|.ts$|.tsx$)\" | wc -c) -ne 0 ]]; then prettier -c $(git diff --name-only --diff-filter=ACMRTUXB origin/dev | grep -E \"(.js$|.jsx$|.ts$|.tsx$)\" | xargs); fi'",
|
||||||
"start": "http-server -p 8000",
|
"start": "http-server -p 8000",
|
||||||
"start:dev": "webpack-dev-server --progress --env.devServer --mode development",
|
"start:dev": "webpack serve --progress --env devServer --mode development",
|
||||||
"start:dev-fast": "webpack-dev-server --progress --env.devServer --mode development --fast true",
|
"start:dev-fast": "webpack serve --progress --env devServer --mode development --fast true",
|
||||||
"start:container": "webpack-dev-server --progress --env.devServer --mode development --env.runInContainer",
|
"start:container": "webpack serve --progress --env devServer --mode development --env runInContainer",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"build:dev": "webpack --mode development",
|
"build:dev": "webpack --mode development",
|
||||||
"lint": "eslint --fix --ext js,jsx,ts,tsx --max-warnings 0 src",
|
"lint": "eslint --fix --ext js,jsx,ts,tsx --max-warnings 0 src",
|
||||||
@ -124,7 +124,7 @@
|
|||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"watch": "webpack --watch --mode production",
|
"watch": "webpack --watch --mode production",
|
||||||
"watch:dev": "webpack --watch --mode development",
|
"watch:dev": "webpack --watch --mode development",
|
||||||
"electron": "sh ./tools/package-electron.sh",
|
"electron": "bash ./tools/package-electron.sh",
|
||||||
"electron:packager": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png --no-prune",
|
"electron:packager": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png --no-prune",
|
||||||
"electron:packager-all": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png",
|
"electron:packager-all": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png",
|
||||||
"electron:packager-win": "electron-packager .package bitburner --platform win32 --arch x64 --out .build --overwrite --icon .package/icon.png",
|
"electron:packager-win": "electron-packager .package bitburner --platform win32 --arch x64 --out .build --overwrite --icon .package/icon.png",
|
||||||
|
@ -20,7 +20,7 @@ import { SpecialServers } from "../Server/data/SpecialServers";
|
|||||||
import { Server } from "../Server/Server";
|
import { Server } from "../Server/Server";
|
||||||
import { Router } from "../ui/GameRoot";
|
import { Router } from "../ui/GameRoot";
|
||||||
import { Page } from "../ui/Router";
|
import { Page } from "../ui/Router";
|
||||||
import * as data from "./AchievementData.json";
|
import data from "./AchievementData.json";
|
||||||
import { FactionNames } from "../Faction/data/FactionNames";
|
import { FactionNames } from "../Faction/data/FactionNames";
|
||||||
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
||||||
import { isClassWork } from "../Work/ClassWork";
|
import { isClassWork } from "../Work/ClassWork";
|
||||||
|
2
tools/package-electron.sh
Normal file → Executable file
2
tools/package-electron.sh
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
|
@ -28,8 +28,10 @@ module.exports = (env, argv) => {
|
|||||||
const devServerSettings = {
|
const devServerSettings = {
|
||||||
hot: true,
|
hot: true,
|
||||||
port: 8000,
|
port: 8000,
|
||||||
|
devMiddleware: {
|
||||||
publicPath: `/`,
|
publicPath: `/`,
|
||||||
stats: statsConfig,
|
stats: statsConfig,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// By default, the webpack-dev-server is not exposed outside of localhost.
|
// By default, the webpack-dev-server is not exposed outside of localhost.
|
||||||
@ -165,13 +167,10 @@ module.exports = (env, argv) => {
|
|||||||
removeEmptyChunks: true,
|
removeEmptyChunks: true,
|
||||||
mergeDuplicateChunks: true,
|
mergeDuplicateChunks: true,
|
||||||
flagIncludedChunks: true,
|
flagIncludedChunks: true,
|
||||||
occurrenceOrder: true,
|
|
||||||
sideEffects: true,
|
sideEffects: true,
|
||||||
providedExports: true,
|
providedExports: true,
|
||||||
usedExports: true,
|
usedExports: true,
|
||||||
concatenateModules: false,
|
concatenateModules: false,
|
||||||
namedModules: false,
|
|
||||||
namedChunks: false,
|
|
||||||
minimize: !isDevelopment,
|
minimize: !isDevelopment,
|
||||||
portableRecords: true,
|
portableRecords: true,
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
@ -191,6 +190,7 @@ module.exports = (env, argv) => {
|
|||||||
"@player": path.resolve(__dirname, "src/Player"),
|
"@player": path.resolve(__dirname, "src/Player"),
|
||||||
"@nsdefs": path.resolve(__dirname, "src/ScriptEditor/NetscriptDefinitions.d.ts"),
|
"@nsdefs": path.resolve(__dirname, "src/ScriptEditor/NetscriptDefinitions.d.ts"),
|
||||||
},
|
},
|
||||||
|
fallback: { crypto: false },
|
||||||
},
|
},
|
||||||
stats: statsConfig,
|
stats: statsConfig,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user