npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webpack-open-browser-plugin

v1.0.7

Published

open browser when webpack after compile(all done)

Downloads

19

Readme

webpack-open-browser-plugin

webpack-dev-server have open browser ability, but the experience is poor, webpack not finish compile, browser already opened, we will see a blank loading page at long time.

webpack devServer 开发服务器有打开浏览器的功能,但是体验很差,在webpack还没编译完成,浏览器已经打开了,显示一个空白的加载页面,要等很久,而且启动开发时,我们在看编译的log输出,打开浏览器突然打断了log输出,显示到眼前的却是一个加载页面,体验非常糟糕。

This plugin resolve the problem: when webpack after compile, browser will open, you can see the webpage, not a blank page!

这个插件会解决这个问题,体验更好!

插件会在webpack编译完成,才打开浏览器,因为编译完成了,你能直接看到网页内容,而不是空白的加载页面。

更好的体验:不会打断编译log输出、不会看到烦人的空白加载页面。

How to use

npm install webpack-open-browser-plugin --save-dev
const OpenBrowserPlugin = require('webpack-open-browser-plugin');

// webpack.config.js
// add to config.plugins
module.exports = {
  plugins: [
    // other plugins

    // add plugin
    new OpenBrowserPlugin({
      url: 'http://localhost:8080'
    })
  ]
}

// Remember to turn off the open browser with devServer, because you have OpenBrowserPlugin now.
// config.devServer: {
//   open: false
// }

npm downloads MIT License

https://www.npmjs.com/package/webpack-open-browser-plugin

本插件结合了webpack的编译hook钩子实现的。

打开浏览器的功能兼容 Windows 和 Mac。

发布的代码经过 es-check es5 验证,最大化兼容不同版本的 nodejs 环境。

理论上兼容 webpack 2.x/3.x/4.x/5.x。