mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix: export Dialog to extensions-api (#2105)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
035dd470ef
commit
741973dd29
@ -16,7 +16,7 @@
|
||||
"dev-run": "nodemon --watch static/build/main.js --exec \"electron --inspect .\"",
|
||||
"dev:main": "yarn run compile:main --watch",
|
||||
"dev:renderer": "yarn run webpack-dev-server --config webpack.renderer.ts",
|
||||
"dev:extension-types": "yarn run compile:extension-types --watch",
|
||||
"dev:extension-types": "yarn run compile:extension-types --watch --progress",
|
||||
"compile": "env NODE_ENV=production concurrently yarn:compile:*",
|
||||
"compile:main": "yarn run webpack --config webpack.main.ts",
|
||||
"compile:renderer": "yarn run webpack --config webpack.renderer.ts",
|
||||
|
||||
@ -146,11 +146,10 @@ export class Dialog extends React.PureComponent<DialogProps, DialogState> {
|
||||
{dialog}
|
||||
</Animate>
|
||||
);
|
||||
}
|
||||
else if (!this.isOpen) {
|
||||
} else if (!this.isOpen) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return createPortal(dialog, document.body);
|
||||
return createPortal(dialog, document.body) as React.ReactPortal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
|
||||
import path from "path";
|
||||
import webpack from "webpack";
|
||||
import { sassCommonVars } from "./src/common/vars";
|
||||
import { sassCommonVars, isDevelopment } from "./src/common/vars";
|
||||
|
||||
export default function (): webpack.Configuration {
|
||||
export default function generateExtensionTypes(): webpack.Configuration {
|
||||
const entry = "./src/extensions/extension-api.ts";
|
||||
const outDir = "./src/extensions/npm/extensions/dist";
|
||||
|
||||
@ -22,6 +22,10 @@ export default function (): webpack.Configuration {
|
||||
// e.g. require('@k8slens/extensions')
|
||||
libraryTarget: "commonjs"
|
||||
},
|
||||
cache: isDevelopment,
|
||||
optimization: {
|
||||
minimize: false, // speed up types compilation
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user