@zinkawaii/nuxt-rewrite
v0.1.1
Published
Nuxt module for rewriting your routes with suffix.
Downloads
1
Readme
Nuxt Rewrite
Nuxt module for rewriting your routes with suffix.
Just for fun!
Features
Automatically append suffix to every route's path
Redirect origin path and aliases to the suffixed path
Quick Setup
Install the module to your Nuxt application with one command:
npx nuxi module add @zinkawaii/nuxt-rewrite
That's it! You can now use nuxt-rewrite in your Nuxt app ✨
Options
export default defineNuxtConfig({
modules: ["@zinkawaii/nuxt-rewrite"],
rewrite: {
/* rewrite options */
}
});
suffix
: An arbitrary string, like "php".
Utils
defineRewriteRouter
When manually configuring routes using app/router.options.ts
, it is necessary to use it to set the suffix.
// app/router.options.ts
export default defineRewriteRouter({
suffix: "php",
routes: [
/* some routes */
]
});
Contribution
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release