react-data-menu
Version:
Smart data-driven menu rendered in an overlay
43 lines (41 loc) • 1.15 kB
JavaScript
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'source-map',
entry: [
'./src/index'
],
output: {
path: path.join(__dirname, 'demo'),
filename: 'bundle.js',
publicPath: '/demo/'
},
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel'],
include: path.join(__dirname, 'src')
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
}, {
test: /\.less$/,
loader: ExtractTextPlugin.extract("style", "css!less")
}]
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
}),
new ExtractTextPlugin('styles.css', {allChunks: true})
]
};