mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix win-ca webpack error in open-lens
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
52b738c33d
commit
f5777c0cfc
@ -3,6 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import * as path from "path";
|
||||
import execFileInjectable from "../fs/exec-file.injectable";
|
||||
import loggerInjectable from "../logger.injectable";
|
||||
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
||||
@ -23,7 +24,7 @@ const pemEncoding = (hexEncodedCert: String) => {
|
||||
const requestSystemCAsInjectable = getInjectable({
|
||||
id: "request-system-cas",
|
||||
instantiate: (di) => {
|
||||
const wincaRootsExePath: string = __non_webpack_require__.resolve("win-ca/lib/roots.exe");
|
||||
const wincaRootsExePath: string = path.resolve(require.resolve("win-ca"), "..", "roots.exe");
|
||||
const execFile = di.inject(execFileInjectable);
|
||||
const logger = di.inject(loggerInjectable);
|
||||
|
||||
|
||||
@ -93,10 +93,12 @@ const config = [
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
externals: {
|
||||
...(rendererConfig.externals as any),
|
||||
"monaco-editor": "commonjs monaco-editor",
|
||||
},
|
||||
externals: [
|
||||
...(rendererConfig.externals as any).filter(Boolean),
|
||||
{
|
||||
"monaco-editor": "commonjs monaco-editor",
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
new DefinePlugin({
|
||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||
|
||||
@ -66,6 +66,7 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
||||
externals: [
|
||||
{
|
||||
"node-fetch": "commonjs node-fetch",
|
||||
"win-ca": "commonjs win-ca",
|
||||
},
|
||||
...additionalExternals,
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user