A Payload 1.x plugin that adds webpack resolve aliases to the admin build through a single helper function. It fixes module-not-found errors caused by Node.js core or server-only modules being pulled into the browser bundle. It ships a built-in list of common server-only modules and accepts objects, arrays or strings.
Shorthand to add common webpack aliases
Installation
npm i payload-plugin-resolve-alias7
Stars
1
Forks
0
Open Issues
2 years ago
Last Updated
1.2k
Weekly Downloads
v0.1.0
npm Version
7.4 KB
Unpacked Size
0
Dependencies
70 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 7 |
| Dec 5, 2026 | 7 |
| Dec 4, 2026 | 7 |
| Dec 3, 2026 | 7 |
| Dec 2, 2026 | 7 |
| Dec 1, 2026 | 7 |
| Nov 30, 2026 | 7 |
| Nov 29, 2026 | 7 |
| Nov 28, 2026 | 7 |
| Nov 27, 2026 | 7 |
| Nov 26, 2026 | 7 |
| Nov 25, 2026 | 7 |
| Nov 24, 2026 | 7 |
| Nov 23, 2026 | 7 |
| Nov 22, 2026 | 7 |
| Nov 21, 2026 | 7 |
| Nov 20, 2026 | 7 |
| Nov 19, 2026 | 7 |
| Nov 18, 2026 | 7 |
| Nov 17, 2026 | 7 |
| Nov 16, 2026 | 7 |
| Nov 15, 2026 | 7 |
| Nov 14, 2026 | 7 |
| Nov 13, 2026 | 7 |
| Nov 12, 2026 | 7 |
| Nov 11, 2026 | 7 |
| Nov 10, 2026 | 7 |
| Nov 9, 2026 | 7 |
| Nov 8, 2026 | 7 |
| Nov 7, 2026 | 7 |
| Nov 6, 2026 | 7 |
| Nov 5, 2026 | 7 |
| Nov 4, 2026 | 7 |
| Nov 3, 2026 | 7 |
| Nov 2, 2026 | 7 |
| Nov 1, 2026 | 7 |
| Oct 31, 2026 | 7 |
| Oct 30, 2026 | 7 |
| Oct 29, 2026 | 7 |
| Oct 28, 2026 | 7 |
| Oct 27, 2026 | 7 |
| Oct 26, 2026 | 7 |
| Oct 25, 2026 | 7 |
| Oct 24, 2026 | 7 |
| Oct 23, 2026 | 7 |
| Oct 22, 2026 | 7 |
| Oct 21, 2026 | 7 |
| Oct 20, 2026 | 7 |
| Oct 19, 2026 | 7 |
| Oct 18, 2026 | 7 |
| Oct 17, 2026 | 7 |
| Oct 16, 2026 | 7 |
| Oct 15, 2026 | 7 |
| Oct 14, 2026 | 7 |
| Oct 13, 2026 | 7 |
| Oct 12, 2026 | 7 |
| Oct 11, 2026 | 7 |
| Oct 10, 2026 | 7 |
| Oct 9, 2026 | 7 |
| Oct 8, 2026 | 7 |
| Oct 7, 2026 | 7 |
| Oct 6, 2026 | 7 |
| Oct 5, 2026 | 7 |
| Oct 4, 2026 | 7 |
| Oct 3, 2026 | 7 |
| Oct 2, 2026 | 7 |
| Oct 1, 2026 | 7 |
| Sep 30, 2026 | 7 |
| Sep 29, 2026 | 7 |
| Sep 28, 2026 | 7 |
| Sep 27, 2026 | 7 |
| Sep 26, 2026 | 7 |
| Sep 25, 2026 | 7 |
| Sep 24, 2026 | 7 |
| Sep 23, 2026 | 7 |
| Sep 22, 2026 | 7 |
| Sep 21, 2026 | 7 |
| Sep 20, 2026 | 7 |
| Sep 19, 2026 | 7 |
| Sep 18, 2026 | 7 |
| Sep 17, 2026 | 7 |
| Sep 16, 2026 | 7 |
| Sep 15, 2026 | 7 |
| Sep 14, 2026 | 7 |
| Sep 13, 2026 | 7 |
| Sep 12, 2026 | 7 |
| Sep 11, 2026 | 7 |
| Sep 10, 2026 | 7 |
| Sep 9, 2026 | 7 |
| Sep 8, 2026 | 7 |
| Sep 7, 2026 | 7 |
1.2K+195 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 1,222 |
| Dec 5, 2026 | 1,134 |
| Dec 4, 2026 | 933 |
| Dec 3, 2026 | 937 |
| Dec 2, 2026 | 1,036 |
| Dec 1, 2026 | 1,039 |
| Nov 30, 2026 | 1,026 |
| Nov 29, 2026 | 1,118 |
| Nov 28, 2026 | 1,148 |
| Nov 27, 2026 | 1,399 |
| Nov 26, 2026 | 1,506 |
| Nov 25, 2026 | 1,450 |
| Nov 24, 2026 | 1,532 |
| Nov 23, 2026 | 1,563 |
| Nov 22, 2026 | 1,409 |
| Nov 21, 2026 | 1,468 |
| Nov 20, 2026 | 1,174 |
| Nov 19, 2026 | 970 |
| Nov 18, 2026 | 750 |
| Nov 17, 2026 | 711 |
| Nov 16, 2026 | 735 |
| Nov 15, 2026 | 664 |
| Nov 14, 2026 | 524 |
| Nov 13, 2026 | 498 |
| Nov 12, 2026 | 544 |
| Nov 11, 2026 | 609 |
| Nov 10, 2026 | 599 |
| Nov 9, 2026 | 555 |
| Nov 8, 2026 | 501 |
| Nov 7, 2026 | 408 |
| Nov 6, 2026 | 387 |
| Nov 5, 2026 | 356 |
| Nov 4, 2026 | 339 |
| Nov 3, 2026 | 344 |
| Nov 2, 2026 | 334 |
| Nov 1, 2026 | 406 |
| Oct 31, 2026 | 417 |
| Oct 30, 2026 | 414 |
| Oct 29, 2026 | 292 |
| Oct 28, 2026 | 226 |
| Oct 27, 2026 | 183 |
| Oct 26, 2026 | 319 |
| Oct 25, 2026 | 232 |
| Oct 24, 2026 | 210 |
| Oct 23, 2026 | 169 |
| Oct 22, 2026 | 196 |
| Oct 21, 2026 | 205 |
| Oct 20, 2026 | 211 |
| Oct 19, 2026 | 82 |
| Oct 18, 2026 | 72 |
| Oct 17, 2026 | 107 |
| Oct 16, 2026 | 187 |
| Oct 15, 2026 | 197 |
| Oct 14, 2026 | 223 |
| Oct 13, 2026 | 221 |
| Oct 12, 2026 | 211 |
| Oct 11, 2026 | 213 |
| Oct 10, 2026 | 364 |
| Oct 9, 2026 | 538 |
| Oct 8, 2026 | 793 |
| Oct 7, 2026 | 927 |
| Oct 6, 2026 | 975 |
| Oct 5, 2026 | 1,074 |
| Oct 4, 2026 | 1,402 |
| Oct 3, 2026 | 1,466 |
| Oct 2, 2026 | 1,498 |
| Oct 1, 2026 | 1,367 |
| Sep 30, 2026 | 1,368 |
| Sep 29, 2026 | 1,327 |
| Sep 28, 2026 | 1,243 |
| Sep 27, 2026 | 1,077 |
| Sep 26, 2026 | 1,022 |
| Sep 25, 2026 | 1,008 |
| Sep 24, 2026 | 1,076 |
| Sep 23, 2026 | 939 |
| Sep 22, 2026 | 937 |
| Sep 21, 2026 | 921 |
| Sep 20, 2026 | 822 |
| Sep 19, 2026 | 637 |
| Sep 18, 2026 | 385 |
| Sep 17, 2026 | 209 |
| Sep 16, 2026 | 232 |
| Sep 15, 2026 | 226 |
| Sep 14, 2026 | 231 |
| Sep 13, 2026 | 201 |
| Sep 12, 2026 | 233 |
| Sep 11, 2026 | 350 |
| Sep 10, 2026 | 564 |
| Sep 9, 2026 | 707 |
| Sep 8, 2026 | 857 |
| Sep 7, 2026 | 1,027 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/562124033-root)<a href="https://payloaddirectory.dev/plugins/562124033-root"><img src="https://payloaddirectory.dev/badge/562124033-root.svg" alt="Payload Directory"></a>README
ERROR in ./node_modules/next/dist/compiled/micromatch/index.js 22:3471-3486
Module not found: Error: Can't resolve 'util' in '\node_modules\next\dist\compiled\micromatch'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
npm install payload-plugin-resolve-alias
# or
yarn add payload-plugin-resolve-alias
// payload.config.ts
import { resolveAlias, serverOnlyModules } from 'payload-plugin-resolve-alias'
export default buildConfig({
plugins: [
resolveAlias(serverOnlyModules, ['nodemailer']),
// Alternative syntax
resolveAlias(
// Object
{ nodemailer: false, passport: false },
// Arra
['nodemailer', 'passport'],
// String
'nodemailer',
'passport',
// Falsy arguments are ignored
process.env.NODE_ENV === 'production' && ['production-only']
),
],
})
serverOnlyModules is an array of modules that you probably don't want in the browser:
Please see CHANGELOG for more information what has changed recently.
Contributions and feedback are very welcome.
To get it running:
npm installnpm run buildThe MIT License (MIT). Please see License File for more information.
Topics
payload plugin tooling
Shared lint, format, TypeScript, build, test and CI config for developing Payload plugins
6039/wk0v4
payload plugin template
Starter template for building Payload v3 plugins with a dev app, tests and Docker support
197v3
payload field factories
Typed factory functions that build Payload field configs with concise, composable overrides
77255/wk1v3
payload utilities
Helper functions for composing field validators, extracting IDs and resolving documents in Payload
77251/wk0v3
payload schema
Define Payload field validation once and compile it to Payload fields and Zod 4 schemas
7139/wk3v3
payload utilities
Developer utilities for traversing, flattening and transforming Payload documents and tidying generated types
6229/wk16v3