vite-plugin-shiwaforce-mpa

1.1.4 • Public • Published

Vite Plugin Shiwaforce MPA

This is a Vite Plugin for Multi Page Applications.

Install

npm i -D vite-plugin-shiwaforce-mpa

Usage

Import the package from the top of your file

import mpa from 'vite-plugin-shiwaforce-mpa';

extend your plugins in the vite.config.js with the mpa() plugin.

plugins: [
	mpa(interceptor = null, serverConfigurations = [], userConfig = {})
],

Interceptor

You can use an interceptor which works before the rewrite rule.

function interceptor(req, res, next) {
	// access req res and next variables
}

serverConfigurations

You can add any express configurations if you import it before, and pass it in as an array.

const cookieParser = require('cookie-parser');
// ...
mpa(interceptor, [cookieParser], {}),

Dependents (0)

Package Sidebar

Install

npm i vite-plugin-shiwaforce-mpa

Weekly Downloads

1

Version

1.1.4

License

MIT

Unpacked Size

8.62 kB

Total Files

6

Last publish

Collaborators

  • shiwaforce