omi/plugins/omi-touch/webpack.config.js

39 lines
834 B
JavaScript

var path = require('path');
var webpack = require('webpack');
/**
* Env
* Get npm lifecycle event to identify the environment
*/
var ENV = process.env.npm_lifecycle_event;
var config = {
entry: __dirname+'/example/' + ENV + '/main.js',
output: {
// path: __dirname,
path: __dirname+'/example/' + ENV + '/',
filename: 'bundler.js'
},
module: {
loaders: [
{
loader: 'babel-loader',
test: /\.js$/,
query: {
presets: 'env',
}
}
]
},
plugins: [
],
stats: {
// Nice colored output
colors: true
},
// Create Sourcemaps for the bundle
// devtool: 'source-map',
};
module.exports = config;