mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/toolkit: completed support for source maps in plugin builds (#22379)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user