Nuxt module to dynamically redirect initial requests
Nuxt module to dynamically redirect
The current redirect is a personal project, please do not use it, it is still in the development stage
- Add the
nuxt-redirects
dependency withyarn
ornpm
to your project - Add
nuxt-redirects
to themodules
section ofnuxt.config.js
: - Configure it:
{
modules: [
['nuxt-redirects']
]
}
{
modules: [
'nuxt-redirects'
],
redirects: {
// Redirect options here
}
}
- url:
api
Backend api interface.
- Default:
'PC'
- Optional value:
'H5' || 'PC'
Distinguish device type.
- Default:
(data) => {}
You can set redirects list.
Simply add the links you want to redirect as objects to the module option Object:
redirects: {
url: `/config/api/seo/redirect/list`
},
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
Copyright (c) Alexander Lichter shadowmon36@gmail.com