mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
38 lines
752 B
TypeScript
Executable File
38 lines
752 B
TypeScript
Executable File
import path from "path";
|
|
import webpack from "webpack";
|
|
import { isProduction, mainDir, outDir } from "./src/common/vars";
|
|
|
|
export default function (): webpack.Configuration {
|
|
return {
|
|
target: "electron-main",
|
|
mode: isProduction ? "production" : "development",
|
|
entry: {
|
|
main: path.resolve(mainDir, "index.ts"),
|
|
},
|
|
output: {
|
|
path: outDir,
|
|
},
|
|
resolve: {
|
|
extensions: ['.json', '.js', '.ts']
|
|
},
|
|
externals: [
|
|
"@kubernetes/client-node",
|
|
"handlebars",
|
|
"node-pty",
|
|
"ws",
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.node$/,
|
|
use: "node-loader"
|
|
},
|
|
{
|
|
test: /\.ts?$/,
|
|
use: "ts-loader",
|
|
},
|
|
]
|
|
},
|
|
}
|
|
}
|