0.0.3 • Published 2 years ago
nuxt-easy-redirect v0.0.3
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 # pnpmBasic 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 installornpm install - Run
pnpm dev:prepareornpm run dev:prepare - Start development server using
pnpm devornpm run dev
License
Copyright (c) 2023 casualmatt Apache License 2.0