1.0.1 • Published 11 months ago

nuxt-olight-redirect v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Redirect Module 🔀 nuxt-redirect-module of oMall.

npm version npm downloads Circle CI Codecov Dependencies Standard JS

Nuxt module to dynamically redirect initial requests

📖 Release Notes

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

  1. Add the nuxt-olight-redirect dependency with yarn or npm to your project
  2. Add nuxt-olight-redirect to the modules section of nuxt.config.js:
  3. 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

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) Alexander Lichter shadowmon36@gmail.com

1.0.1

11 months ago

1.0.0

12 months ago