omi/packages/omi-router/webpack.config.js

42 lines
912 B
JavaScript
Raw Normal View History

2018-11-04 20:01:53 +08:00
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+'/examples/' + ENV + '/main.js',
output: {
// path: __dirname,
path: __dirname+'/examples/' + ENV + '/',
filename: 'bundler.js'
},
module: {
loaders: [
{
loader: 'babel-loader',
test: /\.js$/,
query: {
presets: ['env','omi'],
plugins: [
"transform-class-properties"
]
}
}
]
},
plugins: [
],
stats: {
// Nice colored output
colors: true
},
// Create Sourcemaps for the bundle
// devtool: 'source-map',
};
module.exports = config;