https://github.com/brianneisler/react-omni-webpack-plugin
Webpack plugin for react-omni
https://github.com/brianneisler/react-omni-webpack-plugin
Last synced: 2 months ago
JSON representation
Webpack plugin for react-omni
- Host: GitHub
- URL: https://github.com/brianneisler/react-omni-webpack-plugin
- Owner: brianneisler
- License: mit
- Created: 2016-11-16T23:07:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-17T00:03:47.000Z (about 9 years ago)
- Last Synced: 2025-06-04T05:06:04.358Z (7 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-omni-webpack-plugin
Webpack plugin for react-omni
## Build Status
[](https://badge.fury.io/js/react-omni-webpack-plugin)
[](https://travis-ci.org/brianneisler/stutter)
[](https://nodei.co/npm/react-omni-webpack-plugin/)
## Install
```js
npm install --save-dev react-omni-webpack-plugin
```
## Example webpack.config
```js
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()
]
}
```