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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bonree-vue-loader

v0.9.1

Published

webpack loader to load bonree browser agent automatically.

Readme

bonree-vue-loader

A customized loader to bootstrap bonree agent automatically.

Support

webpack2+

Installation

// with npm
npm install bonree-vue-loader --save-dev


// with yarn
yarn add bonree-vue-loader --dev

With [email protected]

Add the loader to your vue-cli config. For example:

vue.config.js

module.exports = {
  // ...
  chainWebpack: config => {
    config.module
      .rule('bonree-agent')
      .test(/vue\..*\.js$/)
      .use('bonree-vue-loader')
        .loader('bonree-vue-loader')
        .options({
          src: path.resolve(__dirname, 'agent.vue.min.js'),
          config: {
            mode: 'development',
            beacon: {
              development: 'localhost/q'
            }
          }
        })
        .end()
  }
}

With webpack

Add the loader to your webpack config. For example:

webpack.config.js

module.exports = {
  // ...
  module: {
    rules: [{ //...
      test: /vue\..*\.js$/,
      loader: 'bonree-vue-loader',
      options: {
        src: path.resolve(__dirname, 'agent.vue.min.js'),
        config: {
          mode: 'development',
          beacon: {
            development: 'localhost/q'
          }
        }
      }
    }]
  }
}

Options

Name | Type | Required | Description -- | -- | -- | -- src | {String} | true | path of bonree browser agent | config | {Object} | false | config for agent rumtime |

src

Type: String Required: true

You should declare path to bonree browser agent, if missing this path, the injection will be skiped.

config

Type: Object Required: false

You could use customized config with agent.

config.id

Type: Number

ID of browser app.

config.key

Type: String

Valid key of browser app.

config.mode

Type: String Default: production

mode determine where to upload application data, with beacon. You could define different upload address in different mode.

Make sure the filed defined by mode is correctly defined in beacon.

standing mode auto

In a complicated situation, our application has different access url, like a url with ip for private network and a url with domain for internet users. Then you could use auto mode. In this mode, any config of beacon will be ignored.

config.useHttps

Type: Boolean Default: false

The protocol of upload requests is determined by visiting document as default. If document was loading with http, then http will be in use to send application datas. When turn to true, https protocol will be used always.

config.beacon

Type: Object Default: { producton: 'bupload.bonree.com' }

When define a new mode, a new beacon address should be defined too.

{
  mode: 'development', // 'development' | 'production' | 'local'
  beacon: {
    development: 'dev.upload.com',
    production: 'prod.upload.com',
    local: 'localhost'
  }
}

In normal mode, the real upload target is in pattern as below:

${protocol}://${beacon[mode]}/metric

For example:

http://prod.upload.com/metric

for production mode.

In auto mode:

${protocol}://${domain}/upload/metric

For example:

http://www.bonree.com/upload/metric

for bonree homepage.

config.beaconHttps

Type: Object

Set a different upload target for https protocol. If not set, take config.beacon as fallback.

{
  mode: 'custom',
  beacon: {
    custom: 'custom.etl.com:8080/target'
  }
  beaconHttps: {
    custom: 'custom.etl.com:8443/target'
  }
}

config.probability

Type: Number Default: 1000 Unit:

Probability of collection.

config.userKey

Type: String Default: br-user

userId will be a clue to search for snapshots. Agent scan cookie/sessionStorage/localStorage for userId with this key.