mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove css sourcemap/minicss plugin as they are not necessary
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
parent
2ce17be921
commit
196c891c00
@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import webpack from "webpack";
|
import webpack from "webpack";
|
||||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
||||||
|
|
||||||
import { sassCommonVars } from "./src/common/vars";
|
import { sassCommonVars } from "./src/common/vars";
|
||||||
|
|
||||||
export default function (): webpack.Configuration {
|
export default function (): webpack.Configuration {
|
||||||
@ -15,6 +13,8 @@ export default function (): webpack.Configuration {
|
|||||||
filename: 'extension-api.js',
|
filename: 'extension-api.js',
|
||||||
// need to be an absolute path
|
// need to be an absolute path
|
||||||
path: path.resolve(__dirname, 'src/extensions/npm/extensions/dist/src/extensions'),
|
path: path.resolve(__dirname, 'src/extensions/npm/extensions/dist/src/extensions'),
|
||||||
|
// can be use in commonjs environments
|
||||||
|
// e.g. require('@k8slens/extensions')
|
||||||
libraryTarget: "commonjs"
|
libraryTarget: "commonjs"
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
@ -41,18 +41,13 @@ export default function (): webpack.Configuration {
|
|||||||
{
|
{
|
||||||
test: /\.s?css$/,
|
test: /\.s?css$/,
|
||||||
use: [
|
use: [
|
||||||
// https://webpack.js.org/plugins/mini-css-extract-plugin/
|
// Creates `style` nodes from JS strings
|
||||||
MiniCssExtractPlugin.loader,
|
"style-loader",
|
||||||
{
|
// Translates CSS into CommonJS
|
||||||
loader: "css-loader",
|
"css-loader",
|
||||||
options: {
|
|
||||||
sourceMap: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
loader: "sass-loader",
|
loader: "sass-loader",
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
|
||||||
prependData: `@import "${path.basename(sassCommonVars)}";`,
|
prependData: `@import "${path.basename(sassCommonVars)}";`,
|
||||||
sassOptions: {
|
sassOptions: {
|
||||||
includePaths: [
|
includePaths: [
|
||||||
@ -77,10 +72,7 @@ export default function (): webpack.Configuration {
|
|||||||
// new DeclarationBundlerPlugin({
|
// new DeclarationBundlerPlugin({
|
||||||
// moduleName: '@k8slens/extensions',
|
// moduleName: '@k8slens/extensions',
|
||||||
// out: 'extension-api.d.ts',
|
// out: 'extension-api.d.ts',
|
||||||
// }),
|
// })
|
||||||
new MiniCssExtractPlugin({
|
|
||||||
filename: "[name].css",
|
|
||||||
}),
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user