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.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
|
import * as path from "path";
|
||||||
import execFileInjectable from "../fs/exec-file.injectable";
|
import execFileInjectable from "../fs/exec-file.injectable";
|
||||||
import loggerInjectable from "../logger.injectable";
|
import loggerInjectable from "../logger.injectable";
|
||||||
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
||||||
@ -23,7 +24,7 @@ const pemEncoding = (hexEncodedCert: String) => {
|
|||||||
const requestSystemCAsInjectable = getInjectable({
|
const requestSystemCAsInjectable = getInjectable({
|
||||||
id: "request-system-cas",
|
id: "request-system-cas",
|
||||||
instantiate: (di) => {
|
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 execFile = di.inject(execFileInjectable);
|
||||||
const logger = di.inject(loggerInjectable);
|
const logger = di.inject(loggerInjectable);
|
||||||
|
|
||||||
|
|||||||
@ -93,10 +93,12 @@ const config = [
|
|||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
externals: {
|
externals: [
|
||||||
...(rendererConfig.externals as any),
|
...(rendererConfig.externals as any).filter(Boolean),
|
||||||
"monaco-editor": "commonjs monaco-editor",
|
{
|
||||||
},
|
"monaco-editor": "commonjs monaco-editor",
|
||||||
|
},
|
||||||
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||||
|
|||||||
@ -66,6 +66,7 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
|||||||
externals: [
|
externals: [
|
||||||
{
|
{
|
||||||
"node-fetch": "commonjs node-fetch",
|
"node-fetch": "commonjs node-fetch",
|
||||||
|
"win-ca": "commonjs win-ca",
|
||||||
},
|
},
|
||||||
...additionalExternals,
|
...additionalExternals,
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user