1 Star 0 Fork 0

glaye/grafana-zabbix

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.ts 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
import type { Configuration } from 'webpack';
import { merge } from 'webpack-merge';
import grafanaConfig from './.config/webpack/webpack.config';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import RemoveEmptyScriptsPlugin from 'webpack-remove-empty-scripts';
const config = async (env): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
return merge(baseConfig, {
// Add custom config here...
entry: {
module: './module.ts',
'datasource/module': './datasource/module.ts',
'panel-triggers/module': './panel-triggers/module.tsx',
dark: './styles/dark.scss',
light: './styles/light.scss',
},
module: {
rules: [
{
test: /(dark|light)\.scss$/,
exclude: /node_modules/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 1,
url: false,
sourceMap: false,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
postcssOptions: {
plugins: () => [
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: { flexbox: 'no-2009', grid: true },
}),
],
},
},
},
{
loader: 'sass-loader',
options: {
sourceMap: false,
},
},
],
},
],
},
plugins: [
new RemoveEmptyScriptsPlugin({}),
new MiniCssExtractPlugin({
filename: 'styles/[name].css',
}),
],
});
};
export default config;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/glaye/grafana-zabbix.git
git@gitee.com:glaye/grafana-zabbix.git
glaye
grafana-zabbix
grafana-zabbix
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385