1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Upgrade webpack to v5, ts-loader to v8, webpack-node-externals to v2

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen 2020-12-03 14:02:09 +08:00
parent 8d2d1aecd5
commit dc591e4f2e
No known key found for this signature in database
GPG Key ID: A28B7834EFA73792
3 changed files with 187 additions and 544 deletions

View File

@ -281,7 +281,6 @@
"@types/universal-analytics": "^0.4.4",
"@types/uuid": "^8.0.0",
"@types/webdriverio": "^4.13.0",
"@types/webpack": "^4.41.17",
"@types/webpack-dev-server": "^3.11.1",
"@types/webpack-env": "^1.15.2",
"@types/webpack-node-externals": "^1.7.1",
@ -335,7 +334,7 @@
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^3.0.3",
"ts-jest": "^26.1.0",
"ts-loader": "^7.0.5",
"ts-loader": "^8.0.11",
"ts-node": "^8.10.2",
"type-fest": "^0.18.0",
"typedoc": "0.17.0-3",
@ -343,10 +342,10 @@
"typeface-roboto": "^0.0.75",
"typescript": "4.0.2",
"url-loader": "^4.1.0",
"webpack": "^4.44.2",
"webpack": "^5.9.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0",
"webpack-node-externals": "^1.7.2",
"webpack-node-externals": "^2.5.2",
"what-input": "^5.2.10",
"xterm": "^4.6.0",
"xterm-addon-fit": "^0.4.0"

View File

@ -3,7 +3,6 @@ import webpack from "webpack";
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
import { isDevelopment, isProduction, mainDir, buildDir } from "./src/common/vars";
import nodeExternals from "webpack-node-externals";
import ProgressBarPlugin from "progress-bar-webpack-plugin";
import * as vars from "./src/common/vars";
export default function (): webpack.Configuration {
@ -13,7 +12,7 @@ export default function (): webpack.Configuration {
context: __dirname,
target: "electron-main",
mode: isProduction ? "production" : "development",
devtool: isProduction ? "source-map" : "cheap-eval-source-map",
devtool: isProduction ? "source-map" : "eval-source-map",
cache: isDevelopment,
entry: {
main: path.resolve(mainDir, "index.ts"),
@ -25,9 +24,10 @@ export default function (): webpack.Configuration {
resolve: {
extensions: [".json", ".js", ".ts"]
},
externals: [
nodeExternals()
],
// in order to ignore built-in modules like path, fs, etc.
externalsPresets: { node: true },
// in order to ignore all modules in node_modules folder
externals: nodeExternals(),
module: {
rules: [
{
@ -47,8 +47,7 @@ export default function (): webpack.Configuration {
]
},
plugins: [
new ProgressBarPlugin(),
new ForkTsCheckerPlugin(),
].filter(Boolean)
]
};
}

711
yarn.lock

File diff suppressed because it is too large Load Diff