send/webpack.config.js

32 lines
737 B
JavaScript
Raw Normal View History

2017-08-07 02:32:07 +00:00
const path = require('path');
2017-08-15 18:55:52 +00:00
const ManifestPlugin = require('webpack-manifest-plugin');
2017-08-07 02:32:07 +00:00
module.exports = {
entry: {
upload: ['./frontend/src/upload.js'],
download: ['./frontend/src/download.js']
},
output: {
2017-08-15 18:55:52 +00:00
filename: '[name].[chunkhash].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
2017-08-07 02:32:07 +00:00
},
module: {
2017-08-14 19:04:03 +00:00
rules: [
2017-08-07 02:32:07 +00:00
{
test: /\.js$/,
2017-08-14 19:04:03 +00:00
loader: 'babel-loader',
2017-08-09 19:56:32 +00:00
include: [
path.resolve(__dirname, 'frontend'),
path.resolve(__dirname, 'node_modules/testpilot-ga/src')
],
2017-08-14 19:04:03 +00:00
options: {
2017-08-09 19:56:32 +00:00
babelrc: false,
2017-08-10 17:02:13 +00:00
presets: [['es2015', { modules: false }], 'stage-2']
2017-08-09 19:56:32 +00:00
}
2017-08-07 02:32:07 +00:00
}
]
2017-08-15 18:55:52 +00:00
},
plugins: [new ManifestPlugin()]
2017-08-07 02:32:07 +00:00
};