nuxt-redirects

1.0.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i nuxt-redirects

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

6.68 kB

Total Files

5

Last publish

Collaborators

  • shadowmon