mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: Introduce webpack manifest plugin (#49798)
* build(webpack): introduce manifest plugin * build(webpack): move manifest.json to root of project and git ignore
This commit is contained in:
@@ -5,6 +5,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
||||
const { merge } = require('webpack-merge');
|
||||
|
||||
const HTMLWebpackCSSChunks = require('./plugins/HTMLWebpackCSSChunks');
|
||||
@@ -81,6 +82,10 @@ module.exports = (env = {}) =>
|
||||
chunksSortMode: 'none',
|
||||
}),
|
||||
new HTMLWebpackCSSChunks(),
|
||||
new WebpackManifestPlugin({
|
||||
fileName: path.join(process.cwd(), 'manifest.json'),
|
||||
filter: (file) => !file.name.endsWith('.map'),
|
||||
}),
|
||||
function () {
|
||||
this.hooks.done.tap('Done', function (stats) {
|
||||
if (stats.compilation.errors && stats.compilation.errors.length) {
|
||||
|
||||
Reference in New Issue
Block a user