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