multi-page-refresh-plugin

0.0.13 • Public • Published

NPM version

Multi Page Refresh 404 Plugin

目的是解决开发SPA多路由应用时,在不修改nginx配置的前提下防止出现刷新404的问题

Install

npm install multi-page-refresh-plugin --save-dev 

Usage

修改webpack配置
//引入
const MultiPageRefreshPlugin = require('multi-page-refresh-plugin');


//增加配置
plugins:[
    new MultiPageRefreshPlugin({
        routes: [{
            path:'/test1'
        }, 
        {
            path:'/test2'
        } ,
        
        ...
        
        ]
    }),
]

Options

name type default Description
routers Array [] 路由配置数组

PS: html文件的必须是index.html,否则会识别不到html文件

Readme

Keywords

Package Sidebar

Install

npm i multi-page-refresh-plugin

Weekly Downloads

0

Version

0.0.13

License

ISC

Unpacked Size

3.51 kB

Total Files

3

Last publish

Collaborators

  • react-dev