1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/webpack/node-fetch.ts
Sebastian Malton 4764bd2b0d Replace manually specifying nodeJS externals with preset
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-11-10 13:30:45 -05:00

32 lines
737 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import path from "path";
export default {
entry: "./node_modules/node-fetch/src/index.js",
output: {
path: path.resolve(__dirname, "..", "build", "webpack"),
filename: "node-fetch.bundle.js",
library: {
name: "NodeFetch",
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,
},
resolve: {
extensions: [".js"],
},
};