webpack: clean up grunt tasks (leave only benchmark runner) #632
This commit is contained in:
@@ -63,9 +63,7 @@ module.exports = {
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: [
|
||||
require.resolve('babel-preset-env')
|
||||
]
|
||||
presets: ['babel-preset-env']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
37
webpack/webpack.bench.conf.js
Normal file
37
webpack/webpack.bench.conf.js
Normal file
@@ -0,0 +1,37 @@
|
||||
const path = require('path');
|
||||
const baseWebpackConfig = require('./webpack.base.conf');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, '..', dir);
|
||||
}
|
||||
|
||||
var conf = baseWebpackConfig;
|
||||
conf.mode = 'development';
|
||||
conf.entry = {
|
||||
'datasource-zabbix/benchmarks/timeseries_bench': './datasource-zabbix/benchmarks/timeseries_bench.js',
|
||||
};
|
||||
conf.output = {
|
||||
filename: "[name].js",
|
||||
path: resolve('tmp/dist'),
|
||||
libraryTarget: "commonjs2"
|
||||
};
|
||||
conf.plugins = [
|
||||
new CleanWebpackPlugin(['tmp'], {
|
||||
root: resolve('.')
|
||||
}),
|
||||
];
|
||||
conf.module.rules = [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(external)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
query: {
|
||||
presets: ['babel-preset-env']
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = baseWebpackConfig;
|
||||
Reference in New Issue
Block a user