1.0.4 • Published 3 years ago

nuxt-redirects v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Redirect Module 🔀 nuxt-redirect-module

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

  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.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago