1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/node-fetch/webpack.config.js
Sebastian Malton ecdb14c692 fix: Fix generating @k8slens/node-fetch
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-04-14 14:42:00 -04:00

42 lines
784 B
JavaScript

import path from "path";
export default {
entry: "./index.ts",
output: {
path: path.resolve("dist"),
filename: "index.cjs",
library: {
type: "commonjs",
},
clean: true,
asyncChunks: false, // This is required so that only one file is created
},
mode: "production",
target: "electron-renderer",
optimization: {
concatenateModules: true,
minimize: true,
},
externalsPresets: {
node: true,
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
loader: "ts-loader",
options: {
compilerOptions: {
declaration: true,
sourceMap: false,
outDir: path.resolve("./dist/"),
},
},
}
]
},
resolve: {
extensions: [".ts"],
}
};