@grafana/toolkit: completed support for source maps in plugin builds (#22379)

This commit is contained in:
Steven Vachon
2020-02-22 18:54:02 -05:00
committed by GitHub
parent 5b40b26744
commit 3de625ef8e

View File

@@ -129,7 +129,7 @@ const getBaseWebpackConfig: WebpackConfigurationGetter = async options => {
const optimization: { [key: string]: any } = {};
if (options.production) {
optimization.minimizer = [new TerserPlugin(), new OptimizeCssAssetsPlugin()];
optimization.minimizer = [new TerserPlugin({ sourceMap: true }), new OptimizeCssAssetsPlugin()];
} else if (options.watch) {
plugins.push(new HtmlWebpackPlugin());
}
@@ -198,6 +198,7 @@ const getBaseWebpackConfig: WebpackConfigurationGetter = async options => {
options: {
presets: [['@babel/preset-env', { modules: false }]],
plugins: ['angularjs-annotate'],
sourceMaps: true,
},
},
{
@@ -215,6 +216,7 @@ const getBaseWebpackConfig: WebpackConfigurationGetter = async options => {
options: {
presets: [['@babel/preset-env', { modules: false }]],
plugins: ['angularjs-annotate'],
sourceMaps: true,
},
},
],