mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use isolatedmodules with babel
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
2f17a7ec67
commit
61d79e2630
2
.babelrc
2
.babelrc
@ -1,6 +1,6 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
["@babel/preset-env", {"modules": false}],
|
||||
"@babel/preset-react",
|
||||
"@lingui/babel-preset-react"
|
||||
],
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
export { isAllowedResource } from "../../common/rbac";
|
||||
export { apiManager } from "../../renderer/api/api-manager";
|
||||
export { KubeObjectStore } from "../../renderer/kube-object.store";
|
||||
export { KubeApi, forCluster, IKubeApiCluster } from "../../renderer/api/kube-api";
|
||||
export { KubeApi, forCluster } from "../../renderer/api/kube-api";
|
||||
export type { IKubeApiCluster } from "../../renderer/api/kube-api";
|
||||
export { KubeObject } from "../../renderer/api/kube-object";
|
||||
export { Pod, podsApi, PodsApi, IPodContainer, IPodContainerStatus } from "../../renderer/api/endpoints";
|
||||
export { Pod, podsApi, PodsApi } from "../../renderer/api/endpoints";
|
||||
export type { IPodContainer, IPodContainerStatus } from "../../renderer/api/endpoints";
|
||||
export { Node, nodesApi, NodesApi } from "../../renderer/api/endpoints";
|
||||
export { Deployment, deploymentApi, DeploymentApi } from "../../renderer/api/endpoints";
|
||||
export { DaemonSet, daemonSetApi } from "../../renderer/api/endpoints";
|
||||
@ -11,7 +13,8 @@ export { StatefulSet, statefulSetApi } from "../../renderer/api/endpoints";
|
||||
export { Job, jobApi } from "../../renderer/api/endpoints";
|
||||
export { CronJob, cronJobApi } from "../../renderer/api/endpoints";
|
||||
export { ConfigMap, configMapApi } from "../../renderer/api/endpoints";
|
||||
export { Secret, secretsApi, ISecretRef } from "../../renderer/api/endpoints";
|
||||
export { Secret, secretsApi } from "../../renderer/api/endpoints";
|
||||
export type { ISecretRef } from "../../renderer/api/endpoints";
|
||||
export { ReplicaSet, replicaSetApi } from "../../renderer/api/endpoints";
|
||||
export { ResourceQuota, resourceQuotaApi } from "../../renderer/api/endpoints";
|
||||
export { HorizontalPodAutoscaler, hpaApi } from "../../renderer/api/endpoints";
|
||||
@ -31,7 +34,8 @@ export { RoleBinding, roleBindingApi } from "../../renderer/api/endpoints";
|
||||
export { ClusterRole, clusterRoleApi } from "../../renderer/api/endpoints";
|
||||
export { ClusterRoleBinding, clusterRoleBindingApi } from "../../renderer/api/endpoints";
|
||||
export { CustomResourceDefinition, crdApi } from "../../renderer/api/endpoints";
|
||||
export { KubeObjectStatus, KubeObjectStatusLevel } from "./kube-object-status";
|
||||
export { KubeObjectStatusLevel } from "./kube-object-status";
|
||||
export type { KubeObjectStatus } from "./kube-object-status";
|
||||
|
||||
// stores
|
||||
export type { EventStore } from "../../renderer/components/+events/event.store";
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
export { navigate } from "../../renderer/navigation";
|
||||
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/navigation";
|
||||
export { IURLParams } from "../../common/utils/buildUrl";
|
||||
export type { IURLParams } from "../../common/utils/buildUrl";
|
||||
|
||||
@ -11,7 +11,8 @@ import isBoolean from "lodash/isBoolean";
|
||||
import uniqueId from "lodash/uniqueId";
|
||||
|
||||
const { conditionalValidators, ...InputValidators } = Validators;
|
||||
export { InputValidators, InputValidator };
|
||||
export { InputValidators };
|
||||
export type { InputValidator };
|
||||
|
||||
type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
||||
type InputElementProps = InputHTMLAttributes<InputElement> & TextareaHTMLAttributes<InputElement> & DOMAttributes<InputElement>;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"jsx": "react",
|
||||
"target": "ES2017",
|
||||
"target": "ES2019",
|
||||
"module": "ESNext",
|
||||
"lib": [
|
||||
"ESNext",
|
||||
@ -23,6 +23,7 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"traceResolution": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"paths": {
|
||||
"*": [
|
||||
"node_modules/*",
|
||||
|
||||
@ -23,6 +23,9 @@ export default function (): webpack.Configuration {
|
||||
resolve: {
|
||||
extensions: ['.json', '.js', '.ts']
|
||||
},
|
||||
optimization: {
|
||||
usedExports: true,
|
||||
},
|
||||
externals: [
|
||||
nodeExternals()
|
||||
],
|
||||
|
||||
@ -57,6 +57,7 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
||||
},
|
||||
optimization: {
|
||||
minimize: isProduction,
|
||||
usedExports: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
cache: true,
|
||||
@ -85,11 +86,6 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
||||
{
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: [
|
||||
["@babel/preset-env", {
|
||||
modules: "commonjs" // ling-ui
|
||||
}],
|
||||
],
|
||||
plugins: [
|
||||
isDevelopment && require.resolve('react-refresh/babel'),
|
||||
].filter(Boolean),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user