EmbarkJS/webpack.config.js

41 lines
976 B
JavaScript

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