open-browser-once-plugin
Version:
Webpack Plugin for open browser once rather than many times
54 lines (38 loc) • 2.14 kB
Markdown
# open-browser-once-plugin
[](https://travis-ci.org/余聪/open-browser-once-plugin)
[](https://codecov.io/github/余聪/open-browser-once-plugin?branch=master)
[](https://www.npmjs.com/package/open-browser-once-plugin)
[](https://www.npmjs.com/package/open-browser-once-plugin)
[](https://prettier.io/)
[](https://conventionalcommits.org)
> Webpack Plugin for open browser once rather than many times
## Why not [open-browser-plugin](https://github.com/huruji/open-browser-plugin)
[open-browser-plugin](https://github.com/huruji/open-browser-plugin) would open multiple same tabs after webpack run many times. But open-browser-once-plugin open it once.
## Installation
```bash
npm install open-browser-once-plugin
# or use yarn
yarn add open-browser-once-plugin
```
## Usage
```javascript
import { OpenBrowserOncePlugin } from 'open-browser-once-plugin'
module.exports = {
// ...
plguins: [new OpenBrowserOncePlugin('http://localhost:8080/app')]
}
```
## Contributing
- Fork it!
- Create your new branch:
`git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
`git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)
## Authors
This library is written and maintained by 余聪, <a href="mailto:yucong@fenbi.com">yucong@fenbi.com</a>.
## License
MIT - [余聪](https://github.com/余聪) 🐟