mirror of https://github.com/grafana/grafana.git
@grafana/toolkit: completed support for source maps in plugin builds (#22379)
This commit is contained in:
parent
5b40b26744
commit
3de625ef8e
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue