rewrite-link-middleware
Returns Express middleware that serves a service worker that resets any previously set service worker configuration. Useful for development.
Example you development site on 127.0.0.1:3000
and have html
:
Link
Using this middleware you will get:
Link
Installation
npm i -D rewrite-link-middleware
API
const createRewriteLinkMiddleware = ;
createRewriteLinkMiddleware(options)
Returns Express middleware that rewrite links in response.
Options
originalURL
Original URL hat you use in html document.
;
;
Other
See other options
Examples
Simple app:
const express = ;const createRewriteLinkMiddleware = ; const app = ; app; app;
const createRewriteLinkMiddleware = ; moduleexports = // ... devServer: { app; } // ... // ...;