mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* 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>
45 lines
969 B
JavaScript
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,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
};
|