1.0.1 • Published 2 years ago
nuxt-olight-redirect v1.0.1
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-olight-redirectdependency withyarnornpmto your project - Add
nuxt-olight-redirectto themodulessection ofnuxt.config.js: - Configure it:
{
modules: [
['nuxt-olight-redirect']
]
}Using top level options
{
modules: [
'nuxt-olight-redirect'
],
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 installornpm install - Start development server using
npm run dev
License
Copyright (c) Alexander Lichter shadowmon36@gmail.com