Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Edge router for next.js apps. Allows you to configure rewrites, redirects, i18n and basePath at the middleware level instead of next.config.js.

License

Notifications You must be signed in to change notification settings

alexdln/nimpl-router

Repository files navigation

@nimpl/router

Edge router for next.js apps. Allows you to configure rewrites, redirects, i18n and basePath at the middleware level instead of next.config.js

Visit https://nimpl.dev/docs/router to view the full documentation.

import { createMiddleware } from "@nimpl/router";
export const middleware = createMiddleware({
 redirects: [
 {
 source: "/old",
 destination: "/",
 permanent: false,
 },
 ],
 rewrites: [
 {
 source: "/home",
 destination: "/",
 locale: false,
 },
 ],
 basePath: "/doc",
 i18n: {
 defaultLocale: "en",
 locales: ["en", "de"],
 },
});

Installation

Using npm:

npm i @nimpl/router

Using yarn:

yarn add @nimpl/router

Additional

Please consider giving a star if you like it, it shows that the package is useful and helps continue work on this and other packages.

Create issues with wishes, ideas, difficulties, etc. All of them will definitely be considered and thought over.

License

MIT

About

Edge router for next.js apps. Allows you to configure rewrites, redirects, i18n and basePath at the middleware level instead of next.config.js.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /