Closed
Description
Describe the Bug
You can't generate import maps if there is no importMap.js
file
Link to the code that reproduces this issue
https://github.com/AkioSarkiz/payload-cms-import-map-bug-reproduction
Reproduction Steps
Here is steps
git clone https://github.com/AkioSarkiz/payload-cms-import-map-bug-reproduction
cd payload-cms-import-map-bug-reproduction
pnpm install
pnpm generate:importmap
You can manually create absolutely empty file and then you can run pnpm generate:importmap
and it will work out. The problem is that storing generated code in the repository is not the best idea. It's better to generate importMap on the deployment stage, but you cannot do that right now
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Binaries:
Node: 22.14.0
npm: 11.1.0
Yarn: N/A
pnpm: 10.11.0
Relevant Packages:
payload: 3.40.0
next: 15.3.0
@payloadcms/email-nodemailer: 3.40.0
@payloadcms/graphql: 3.40.0
@payloadcms/next/utilities: 3.40.0
@payloadcms/payload-cloud: 3.40.0
@payloadcms/richtext-lexical: 3.40.0
@payloadcms/translations: 3.40.0
@payloadcms/ui/shared: 3.40.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6000
Available memory (MB): 16384
Available CPU cores: 10
Metadata
Metadata
Assignees
Labels
No labels