🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vite-plugin-multi-pages-entry

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

vite-plugin-multi-pages-entry

Multi Page for vite

0.0.2
unpublished
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-multi-pages-entry

Vite 的多页应用程序支持- 支持 Vue2/3React

Usage

yarn add vite-plugin-multi-pages-entry
# or
pnpm add vite-plugin-multi-pages-entry
// vite.config.ts
import mpa from 'vite-plugin-multi-pages-entry'

// @see https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    // ...other plugins
    mpa(/* options */),
  ],
})

Options

export interface MpaOptions {
  /**
   * viteDevServer的打开路径
   * 此插件将尝试为您打开第一页,但您仍然可以自定义, e.g. /index#/about
   * @default 第一页路径
   */
  defaultOpenPage: string;
  /**
   * 扫描位置
   * @default 'src/pages'
   */
  scanDir: string;
  /**
   * 扫描文件
   * @default 'main.{js,ts,jsx,tsx}'
   */
  scanFile: string;
  /**
   * html 文件名
   * @default 'index.html'
   */
  filename: string;
  /**
   * default included entry
   * @default ''
   */
  defaultEntries: string;
  /**
   * 重写页面跳转规则
   * @default []
   */
  rewrites: Rewrite[]
  /**
   * 开启或打包 scanDir 下特定的页面
   * @default 空 | app-four,app-nine
   */
  specialPageNames: string;
  /**
   * 忽略开启或打包 scanDir 下特定的页面
   * @default 空 | app-four,app-nine
   */
  ignorePageNames: string;
  /**
   * 打包文件目录是否加入前缀
   * @default 空 | string
   */
  buildPrefixName: string;
  /**
   * 打包后是否不需要主目录
   * @default false
   * 配置为 true,会将 index.html 的父级目录删除,同时 index.html 名称会更改为 父目录名称.html
   */
  htmlNoDirectory: boolean
}

Examples

  • see src/examples

Keywords

vite-plugin

FAQs

Package last updated on 30 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts