mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Consolidate downloading binaries into one script - Upgrade lens-k8s-proxy to 0.1.5 which allows us to remove the trailing slash in KubeAuthProxy - Consolidate nromalizing arch and os strings - Remove LensBinary as HelmCli is not just a raw object since it is always bundled - Introduce OnceCell and use it for the binary paths Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fully remove helmCli, move associated variable to vars Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix helm downloading on windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Don't download binaries for unsupported windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Arch specific paths Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix downloading helm on windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * rename once-cell file to lazy-initialized Signed-off-by: Sebastian Malton <sebastian@malton.name>
63 lines
1.7 KiB
TypeScript
Executable File
63 lines
1.7 KiB
TypeScript
Executable File
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import path from "path";
|
|
import type webpack from "webpack";
|
|
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
import nodeExternals from "webpack-node-externals";
|
|
import * as vars from "./src/common/vars";
|
|
import getTSLoader from "./src/common/getTSLoader";
|
|
import CircularDependencyPlugin from "circular-dependency-plugin";
|
|
import { iconsAndImagesWebpackRules } from "./webpack.renderer";
|
|
|
|
const configs: { (): webpack.Configuration }[] = [];
|
|
|
|
configs.push((): webpack.Configuration => {
|
|
console.info("WEBPACK:main", { ...vars });
|
|
const { mainDir, buildDir, isDevelopment } = vars;
|
|
|
|
return {
|
|
name: "lens-app-main",
|
|
context: __dirname,
|
|
target: "electron-main",
|
|
mode: isDevelopment ? "development" : "production",
|
|
devtool: isDevelopment ? "cheap-module-source-map" : "source-map",
|
|
cache: isDevelopment ? { type: "filesystem" } : false,
|
|
entry: {
|
|
main: path.resolve(mainDir, "index.ts"),
|
|
},
|
|
output: {
|
|
libraryTarget: "global",
|
|
path: buildDir,
|
|
},
|
|
resolve: {
|
|
extensions: [".json", ".js", ".ts"],
|
|
},
|
|
externals: [
|
|
nodeExternals(),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.node$/,
|
|
use: "node-loader",
|
|
},
|
|
getTSLoader({}, /\.ts$/),
|
|
...iconsAndImagesWebpackRules(),
|
|
],
|
|
},
|
|
plugins: [
|
|
new ForkTsCheckerPlugin(),
|
|
new CircularDependencyPlugin({
|
|
cwd: __dirname,
|
|
exclude: /node_modules/,
|
|
failOnError: true,
|
|
}),
|
|
].filter(Boolean),
|
|
};
|
|
});
|
|
|
|
export default configs;
|