7f701830e5
Clean up css styles for each components in a clear order. Now all the styles are in customized.css which is not clear for each components. So, we should delete customized.css, and for each component we create a corresponding css style. Change-Id: Ic23c45c8f380820da0689e728bcf99daa260f2e0 Signed-off-by: Andy Yan <yanchao3@lenovo.com>
38 lines
992 B
JavaScript
38 lines
992 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'],
|
|
}
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
loader: "style-loader!css-loader"
|
|
}
|
|
]
|
|
},
|
|
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 }),
|
|
],
|
|
};
|