
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
vite-plugin-multi-pages-entry
Advanced tools
对 Vite 的多页应用程序支持- 支持Vue2/3、React 等
yarn add vite-plugin-mpa
# or
yarn add vite-plugin-mpa
// vite.config.ts
import mpa from 'vite-plugin-mpa'
// @see https://vitejs.dev/config/
export default defineConfig({
plugins: [
// ...other plugins
mpa(/* options */),
],
})
export interface MpaOptions {
/**
* viteDevServer的打开路径
* 此插件将尝试为您打开第一页,但您仍然可以自定义, e.g. /index#/about
* @default 第一页路径
*/
defaultOpenPage: '/' | boolean | 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;
/**
* rewrite rule list
* @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
}
FAQs
Multi Page for vite
The npm package vite-plugin-multi-pages-entry receives a total of 0 weekly downloads. As such, vite-plugin-multi-pages-entry popularity was classified as not popular.
We found that vite-plugin-multi-pages-entry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.