react-omni-webpack-plugin
v0.0.1
Published
Webpack plugin for react-omni
Downloads
4
Readme
react-omni-webpack-plugin
Webpack plugin for react-omni
Build Status
Install
npm install --save-dev react-omni-webpack-plugin
Example webpack.config
import path from 'path'
import webpack from 'webpack'
import HtmlPlugin from 'html-webpack-plugin'
import ReactOmniPlugin from 'react-omni-webpack-plugin'
const DIRECTORY = path.join(__dirname)
export default {
entry: [
path.join(__dirname, '../index.js')
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: { cacheDirectory: true }
},
{
test: /\.(gif|jpe?g|png|svg)$/,
loader: 'url-loader',
query: { name: '[name].[hash:16].[ext]' }
}
]
},
output: {
filename: 'bundle.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new HtmlPlugin(),
new ReactOmniPlugin()
]
}