npmx-redirect
Browser extension that automatically redirects npmjs.com URLs to npmx.dev.
Installation
Install from Webstores
Download from GitHub Releases
- Visit the GitHub Releases page
- Download the appropriate ZIP file for your browser:
- Chrome:
npmx-redirect-chrome-mv3.zip - Firefox:
npmx-redirect-firefox-mv3.zip(ornpmx-redirect-firefox-mv2.zipfor older versions) - Edge:
npmx-redirect-edge-mv3.zip - Brave:
npmx-redirect-brave-mv3.zip - Opera:
npmx-redirect-opera-mv3.zip
- Chrome:
- Extract the ZIP file to a folder on your computer
Install in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" using the toggle in the top right
- Click "Load unpacked"
- Select the extracted extension folder (e.g.,
chrome-mv3-prod) - The extension is now installed and active
Install in Firefox
- Open Firefox and navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Navigate to the extracted extension folder and select the
manifest.jsonfile - The extension is now installed and active
Note: Firefox requires re-loading temporary extensions after each browser restart.
Usage
Once installed, the extension automatically redirects all npmjs.com URLs to their npmx.dev equivalents:
https://www.npmjs.com/package/reactredirects tohttps://npmx.dev/package/reacthttps://www.npmjs.com/~usernameredirects tohttps://npmx.dev/~usernamehttps://www.npmjs.com/org/exampleredirects tohttps://npmx.dev/org/example- Search queries are also redirected
No configuration required.
Development
Prerequisites
- Node.js 20+
- pnpm
Setup
# Install dependencies pnpm install # Run development server pnpm dev
Load the development build from build/chrome-mv3-dev (or your target browser) in your browser.
Build
# Build for all browsers pnpm build:all # Build for specific browser pnpm build:chrome pnpm build:firefox pnpm build:edge
Production builds are output to the build/ directory.
Testing
# Run tests pnpm test # Run tests with UI pnpm test:ui
Contributing
Contributions are welcome.
License
MIT