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

multi-html-webpack-plus

v0.5.0

Published

一个基于html-webpack-plugin,以及vue-cli3扩展的多页构建插件

Readme

multi-html-webpack-plus

简介

vue-cli3 搭建的应用,通过配置 pages属性来支持多页应用。 有时候在部署的时候,可能会把dist整个目录部署在一个不确定的目录下面。 vue.config.js中提供了publicPath可以配置,但是由于可能存在的目录不确定性,如果一单更改目录就需要去更改配置。 也是比较麻烦,所以在相对路径构建的时候MultiHtmlWwebpackPlus会通过层级追加../最终形成相对路径注入到html中。

安装

npm i multi-html-webpack-plus --save-dev

配置

// vue.config.js

const {autoScan, MultiHtmlWebpackPlus} = require('multi-html-webpack-plus')

module.exports = {
  publicPath: './',
  configureWebpack: {
    plugins: [
      new MultiHtmlWebpackPlus()
    ]
  },
  pages: autoScan({appDir: 'pages'}) // 这个自动扫描src/pages/下的所有js,构建pages对象
}

autoScan

同时提供了autoScan方法自动扫描src/目录下某个文件夹的多页文件 如下返回实例就扫描src/pages下的页面。

{
	'a/a.js': {
		entry: 'src/pages/a/a.js',
		template: 'src/pages/a/a.html',
		filename: 'pages/a/a.html'
	},
	'a/c/c.js': {
		entry: 'src/pages/a/c/c.js',
		template: 'src/pages/a/c/c.html',
		filename: 'pages/a/c/c.html'
	},
	'b/b.js': {
		entry: 'src/pages/b/b.js',
		template: 'src/pages/b/b.html',
		filename: 'pages/b/b.html'
	},
	'b/c/c.js': {
		entry: 'src/pages/b/c/c.js',
		template: 'src/pages/b/c/c.html',
		filename: 'pages/b/c/c.html'
	}
}