@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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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,
},
},
],