2016-10-13 14:54:07 -04:00
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
2018-05-07 12:40:37 -04:00
|
|
|
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
2017-04-11 11:29:29 -04:00
|
|
|
devtool: 'cheap-module-source-map',
|
2016-10-13 14:54:07 -04:00
|
|
|
entry: {
|
2017-04-17 11:22:16 -04:00
|
|
|
dist: './src/index.js'
|
2016-10-13 14:54:07 -04:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: __dirname,
|
|
|
|
library: 'AudioEngine',
|
|
|
|
libraryTarget: 'commonjs2',
|
|
|
|
filename: '[name].js'
|
|
|
|
},
|
|
|
|
module: {
|
2018-05-07 12:40:37 -04:00
|
|
|
rules: [{
|
2016-10-13 14:54:07 -04:00
|
|
|
test: /\.js$/,
|
|
|
|
include: path.resolve(__dirname, 'src'),
|
2018-05-07 12:40:37 -04:00
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
2016-10-13 14:54:07 -04:00
|
|
|
presets: ['es2015']
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
};
|