New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@axew/jugg-plugin-multi-html

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axew/jugg-plugin-multi-html

Aim to generate multi html files with `routes` config, which is base on `html-webpack-plugin`.

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

jugg-plugin-multi-html

Aim to generate multi html files with routes config, which is base on html-webpack-plugin.

config

interface Config {
  routes: Array<{
    // route path
    path: string;
    // assign a specific template path, relative to the `src/`
    template?: string;
  }>;
}

example

// .juggrc.js
export default {
  plugins: [
    [
      '@axew/jugg-plugin-multi-html',
      {
        routes: [
          {
            path: '/user',
            template: './documents/user.ejs'
          },
          {
            path: '/user/profile',
            template: './documents/profile.ejs'
          }
        ]
      }
    ]
  ]
}

After building.

# dist/
.
├── index.f4bf6a3f58833a69beb9.js
├── index.html
└── user
    ├── index.html
    └── profile
        └── index.html

Notice

  • When publichPath is a relative path, assets path in html is not right.

FAQs

Package last updated on 11 Jan 2019

Related posts