added webpack

This commit is contained in:
Danny Coates 2017-08-06 19:32:07 -07:00
parent c91d24cd86
commit 9172af48fd
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
5 changed files with 2748 additions and 48 deletions

22
webpack.config.js Normal file
View file

@ -0,0 +1,22 @@
const path = require('path');
module.exports = {
entry: {
upload: ['./frontend/src/upload.js'],
download: ['./frontend/src/download.js']
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'public')
},
module: {
loaders: [
{
test: /\.js$/,
loaders: 'babel-loader',
include: [path.resolve(__dirname, 'frontend'), path.resolve(__dirname, 'node_modules/testpilot-ga/src')],
query: { babelrc: false, presets: ['es2015', 'stage-2'], plugins: ['add-module-exports'] }
}
]
}
};