我在删除webpack 4中未使用的CSS时遇到问题.似乎大多数CSS纯化插件都依赖于提取文本插件,该插件未针对版本4进行更新.
这是我的命令:
node_modules/.bin/webpack --mode = development --env.operation = separateCSS
要么
node_modules/.bin/webpack --mode = development --env.operation = bundleCSS
这是我的webpack.config.js的一部分:
rules: [
// Loader for SASS files
{
test: /\.s[ac]ss$/,
use: [
// Use IIFE to choose how to emit the CSS: 1. Extract as separate file 2: Bundle with the JS file
(() => { return env.operation == "separateCSS" ? MiniCssExtractPlugin.loader : 'style-loader'; })(),
{ loader: 'css-loader', options: { importLoaders: 1, url: true } },
{
loader: 'postcss-loader',
options: { …
Run Code Online (Sandbox Code Playgroud) 我正在尝试过滤prometheus.yml
. 假设以下内容是 yml 文件的一部分。如何使用中的值的正则表达式返回实例与启动,让说,prod
或者qa
还是其他的标签?这可以不配置relabeling
吗?
ec2_sd_configs:
- region: us-east-1
access_key: access
secret_key: mysecret
profile: profile
filters:
- name: tag:Name
values:
- prod.*
- qa.*
Run Code Online (Sandbox Code Playgroud)