hyper/app/webpack.config.js

37 lines
757 B
JavaScript
Raw Normal View History

2016-06-30 22:01:04 -08:00
const webpack = require('webpack');
const path = require('path');
const nodeEnv = process.env.NODE_ENV || 'development';
const isProd = nodeEnv === 'production';
module.exports = {
devtool: isProd ? 'hidden-source-map' : 'cheap-eval-source-map',
entry: './index.js',
output: {
path: path.join(__dirname, './dist'),
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loaders: [
'babel-loader'
]
},
2016-07-01 12:01:33 -08:00
{
test: /\.json/,
loader: 'json-loader'
},
2016-06-30 22:01:04 -08:00
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
],
plugins: [
new webpack.optimize.OccurrenceOrderPlugin()
]
}
};