1
0
mirror of https://github.com/lensapp/lens.git synced 2024-11-28 20:14:22 +03:00

chore: Run lint on webpack/renderer

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-05-05 12:12:39 -04:00
parent 91354eae01
commit 700a9024a8

View File

@ -14,7 +14,14 @@
import CopyPlugin from "copy-webpack-plugin";
import type { WebpackPluginInstance } from "webpack";
import { DefinePlugin } from "webpack";
import { assetsFolderName, isDevelopment, rendererDir, buildDir, htmlTemplate, publicPath } from "./vars";
import {
assetsFolderName,
isDevelopment,
rendererDir,
buildDir,
htmlTemplate,
publicPath,
} from "./vars";
import corePackageJson from "@k8slens/core/package.json";
const renderer: webpack.Configuration = {
@ -45,15 +52,9 @@
/\[ReactRefreshPlugin] .*?HMR.*? is not enabled/, // enabled in webpack.dev-server
],
resolve: {
extensions: [
".js", ".jsx", ".json",
".ts", ".tsx",
],
extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
},
externals: [
"npm",
"win-ca"
],
externals: ["npm", "win-ca"],
optimization: {
minimize: false,
},
@ -126,11 +127,7 @@
],
}),
...(
isDevelopment
? [new ReactRefreshWebpackPlugin()]
: []
),
...(isDevelopment ? [new ReactRefreshWebpackPlugin()] : []),
],
};
@ -176,10 +173,10 @@
/**
* Import CSS or SASS styles with modules support (*.module.scss)
*/
export function cssModulesWebpackRule({ styleLoader }: CssModulesWebpackRuleOptions = {}): webpack.RuleSetRule {
styleLoader ??= isDevelopment
? "style-loader"
: MiniCssExtractPlugin.loader;
export function cssModulesWebpackRule({
styleLoader,
}: CssModulesWebpackRuleOptions = {}): webpack.RuleSetRule {
styleLoader ??= isDevelopment ? "style-loader" : MiniCssExtractPlugin.loader;
return {
test: /\.s?css$/,