1.0.9 • Published 1 year ago

@chipunderblade/vite-plugin-mpa v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

vite-mpa-plugin

Usage

return defineConfig({
    plugins: [
      mpa(), // must on the first
      react(),
    ],

Plugin Options

All parameters are required!

  • Source Folder (default: src)
  • Page Prefix (default: pages)
  • File name (default: index.html)
  • Default Entry (default: index, Use the dev path to set default entry.)

Path Pattern

{source folder}/{page prefix}/{your page name}/{page html file}

example

/src/pages/index.html -> /
/src/pages/a/index.html -> /a/ 
/src/pages/a/pages/b/index.html -> /a/b

Equivalent Path

The three paths below are equivalent.

/a
/a/
/a/index.html