1.1.4 • Published 2 years ago

vite-plugin-shiwaforce-mpa v1.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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], {}),
1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago