nuxt-easy-redirect
v0.0.3
Published
redirects made easy for Nuxt 3
Downloads
80
Readme
nuxt-easy-redirect
Configure simple Redirects within your Nuxt application ➡️
Setup
yarn add nuxt-easy-redirect # yarn
npm i nuxt-easy-redirect # npm
pnpm add nuxt-easy-redirect # pnpm
Basic usage
Add nuxt-easy-redirect
to your Nuxt config:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-easy-redirect"],
});
Configuration
You can configure nuxt-easy-redirect
in your nuxt.config.ts
file:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-easy-redirect"],
redirects: {
verbose: true,
rules: [
{
origin: "/about",
destination: "/about-us",
statusCode: 302,
},
{
origin: "/about1",
destination: "/about-us2",
statusCode: 301,
},
],
},
devtools: { enabled: true },
});
Development
- Clone this repository
- Install dependencies using
pnpm install
ornpm install
- Run
pnpm dev:prepare
ornpm run dev:prepare
- Start development server using
pnpm dev
ornpm run dev
License
Copyright (c) 2023 casualmatt Apache License 2.0