Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

What's the right way to manage importMap.js - is there a tool to auto update or regenerate that?

default discord avatar
evisteron4 months ago
2

Is there some way to autogenerate that? Or some guide to follow for what to put in there? I didin't see anything clear in the docs.



oh, neat



ah, found it:

https://payloadcms.com/docs/admin/components#import-map

Thanks!



A point of clarification - I didn't have that script in my package.json (probably because I've been using the beta for a few months). Easy enough to add it based on the similar

generate:types

which IS in there.



"scripts": {
  "generate:importmap": "payload generate:importmap",
  • default discord avatar
    Payload-Bot5 months ago


  • discord user avatar
    seanzubrickas
    5 months ago

    All you need to run is this command:



    pnpm generate:importmap
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.