0.0.14 • Published 6 months ago

vite-plugin-multi-pages v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

vite-plugin-multi-pages

English | 中文

Multi page applications supporting vite - vue2、3, react, etc

How To Use

Install

yarn add vite-plugin-multi-pages
# or
pnpm add vite-plugin-multi-pages

ToConfigure

vite.config.ts

import mpa from 'vite-plugin-multi-pages';

export default defineConfig({
  plugins: [mpa(/* options */)],
});

Options

export interface MpaOptions {
  /**
   * defaultOpenPage
   * @default true
   * @example / (root path) | true (first page) | test-two
   */
  defaultOpenPage: '/' | boolean | string;
  /**
   * scanning dir
   * @default src/views
   */
  scanDir: string;
  /**
   * scanFile
   * @default 'main.{js,ts,jsx,tsx}'
   */
  scanFile: string;
  /**
   * html fileName
   * @default 'index.html'
   */
  filename: string;
  /**
   * rewrite rule list
   * @default []
   */
  rewrites: Rewrite[];
  /**
   * open or build a specific page under scanDir
   * @default ''
   * @example test-one,test-twos
   */
  specialPageNames: string;
  /**
   * ignore open or build a specific page under scanDir
   * @default ''
   * @example test-twos
   */
  ignorePageNames: string;
}

examples

More

0.0.13

6 months ago

0.0.14

6 months ago

0.0.12

9 months ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago