https://github.com/svrxjs/svrx-plugin-webpack
svrx plugin for webpack
https://github.com/svrxjs/svrx-plugin-webpack
svrx svrx-plugin webpack
Last synced: about 2 months ago
JSON representation
svrx plugin for webpack
- Host: GitHub
- URL: https://github.com/svrxjs/svrx-plugin-webpack
- Owner: svrxjs
- License: mit
- Created: 2019-07-16T07:18:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-09T13:44:24.000Z (over 5 years ago)
- Last Synced: 2025-03-30T07:18:24.076Z (over 1 year ago)
- Topics: svrx, svrx-plugin, webpack
- Language: JavaScript
- Homepage:
- Size: 427 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svrx-plugin-webpack
[](https://svrx.io/)
[](https://www.npmjs.com/package/svrx-plugin-webpack)
[svrx](https://github.com/x-orpheus/svrx) plugin for [webpack](https://webpack.js.org/)
## Usage
> Please make sure that you have installed [svrx](https://svrx.io/) already.
### Via CLI
```bash
svrx -p "webpack"
```
### Via API
```js
const svrx = require('@svrx/svrx');
svrx({ plugins: ['webpack'] }).start();
```
**with options**
```js
svrx({
plugins: [{
name: 'webpack',
options: {
hot: false
}
}]
}).start();
```
## Options
#### **config \[String|Object]:**
webpack config file or object, default is `$root/webpack.config.js` (`$root` means `options.root`)
#### **hot \[Boolean]:**
Enable webpack Hot Module Replacement feature, default is `true`
#### **client \[Object]:**
options can be passed to the client by adding querystring parameters to the path in the webpack config
see [webpack-hot-middleware#client](https://github.com/webpack-contrib/webpack-hot-middleware#client) for detail
for example, options `{timeout: 3000}` will been encode as `webpack-hot-middleware/client?timeout=3000`
#### **path \[String]:**
The path which the middleware will serve the event stream on, default is `/__webpack_hmr`
## Example
- [simple](https://github.com/x-orpheus/svrx-plugin-webpack/tree/master/example/simple)
- [react-loader](https://github.com/x-orpheus/svrx-plugin-webpack/tree/master/example/react-loader)
- [integrated-with-create-react-app](https://github.com/x-orpheus/svrx-plugin-webpack/tree/master/example/create-react-app)
## License
MIT