3d6b09f2f3
To make 'valence' as a clean python module for valence api, this patch move js code for ui to top directory. Change-Id: I826953754be49636cd99a14a1547d166a334a187
34 lines
909 B
JavaScript
34 lines
909 B
JavaScript
var webpack = require('webpack');
|
|
var path = require('path');
|
|
|
|
var nodeEnv = process.env.NODE_ENV || 'development';
|
|
var debug = nodeEnv !== "development";
|
|
|
|
module.exports = {
|
|
context: path.join(__dirname, "src"),
|
|
devtool: debug ? "inline-sourcemap" : null,
|
|
entry: "./js/main.js",
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.jsx?$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
loader: 'babel-loader',
|
|
query: {
|
|
presets: ['react', 'es2015', 'stage-0'],
|
|
plugins: ['react-html-attrs', 'transform-class-properties', 'transform-decorators-legacy'],
|
|
}
|
|
}
|
|
]
|
|
},
|
|
output: {
|
|
path: __dirname + "/src/",
|
|
filename: "bundle.min.js"
|
|
},
|
|
plugins: debug ? [] : [
|
|
new webpack.optimize.DedupePlugin(),
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
|
|
],
|
|
};
|