mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 12:52:23 +08:00
plugibs: expose more to plugins
This commit is contained in:
@ -8,16 +8,6 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
const WebpackCleanupPlugin = require('webpack-cleanup-plugin');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const pkg = require('../../package.json');
|
||||
const _ = require('lodash');
|
||||
|
||||
let dependencies = Object.keys(pkg.dependencies);
|
||||
// remove jquery
|
||||
dependencies = _.filter(dependencies, function(key) {
|
||||
return key !== 'jquery';
|
||||
});
|
||||
// add it first
|
||||
dependencies.unshift('jquery');
|
||||
|
||||
module.exports = merge(common, {
|
||||
devtool: "source-map",
|
||||
@ -25,7 +15,7 @@ module.exports = merge(common, {
|
||||
entry: {
|
||||
dark: './public/sass/grafana.dark.scss',
|
||||
light: './public/sass/grafana.light.scss',
|
||||
vendor: dependencies,
|
||||
vendor: require('./dependencies'),
|
||||
},
|
||||
|
||||
module: {
|
||||
@ -55,8 +45,8 @@ module.exports = merge(common, {
|
||||
names: ['vendor', 'manifest'],
|
||||
}),
|
||||
new WebpackCleanupPlugin(),
|
||||
// new BundleAnalyzerPlugin({
|
||||
// analyzerPort: 8889
|
||||
// })
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerPort: 8889
|
||||
})
|
||||
]
|
||||
});
|
||||
|
Reference in New Issue
Block a user