truman
Version:
Simple test fixtures for single page apps
40 lines (36 loc) • 774 B
JavaScript
const webpack = require('webpack')
const path = require('path')
const uglify = new webpack.optimize.UglifyJsPlugin({
comments: false,
sourceMap: false,
mangle: false,
compress: {
warnings: false,
drop_debugger: false
}
})
module.exports = {
entry: './src/truman.js',
output: {
path: __dirname,
filename: 'truman.js',
libraryTarget: 'var',
library: 'truman'
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /(node_modules)/,
loader: 'babel', // 'babel-loader' is also a legal name to reference
query: {
presets: ['es2015'],
cacheDirectory: true
}
}
]
},
plugins: [uglify],
recordsPath: path.resolve('/tmp/truman.webpack.json')
}