webpack.config.js

This commit is contained in:
Michael Bradley, Jr 2018-07-05 19:26:14 -05:00
parent 333d8c06dd
commit 80a7f6019f
1 changed files with 38 additions and 0 deletions

38
webpack.config.js Normal file
View File

@ -0,0 +1,38 @@
const path = require('path');
const browser = {
entry: path.resolve(__dirname, 'dist') + '/browser.js',
mode: 'production',
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/env']
]
}
}
}
]
},
// optimization: {
// minimize: false
// },
output: {
filename: 'embark.min.js',
library: 'EmbarkJS',
libraryTarget: 'umd',
libraryExport: 'default',
path: __dirname,
umdNamedDefine: true,
},
target: 'web'
};
module.exports = [
browser
];