1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/infrastructure/webpack/src/react-config.js
Janne Savolainen c09c7125e5
Add package for sharing webpack configurations for upcoming Features (#7199)
* Add package for shared webpack configurations for Lens applications, Features and libraries

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove duplication from gitignores

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-02-22 12:28:07 +02:00

45 lines
969 B
JavaScript

const nodeConfig = require("./node-config");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
...nodeConfig,
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
module: {
...nodeConfig.module,
rules: [
...nodeConfig.module.rules,
{
test: /\.s?css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
sourceMap: false,
modules: {
auto: /\.module\./i, // https://github.com/webpack-contrib/css-loader#auto
mode: "local", // :local(.selector) by default
localIdentName: "[name]__[local]--[hash:base64:5]",
},
},
},
{
loader: "sass-loader",
options: {
sourceMap: false,
},
},
],
},
],
},
};