mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Upgrade to latest node-fetch - Introduce injection tokens for retriving the implementation of node-fetch via await import() calls - Add webpack file for compiling node-fetch to electron-renderer single file format Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update lock file Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add type packages which were removed for some reason Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add more dev @types deps that weren't added last time Signed-off-by: Sebastian Malton <sebastian@malton.name> * Simpify by using webpack to create a commonjs package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix build for integration tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix unit tests on CI not having all deps Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Revert accidental timeout change Signed-off-by: Sebastian Malton <sebastian@malton.name> * Replace manually specifying nodeJS externals with preset Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
32 lines
737 B
TypeScript
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"],
|
|
},
|
|
};
|