[live-preview] library has dependency to payload package
#14844
Replies: 1 comment
-
|
Thanks for the report! This isn't specific to Enabling On top of that, to guarantee that our dependencies compile cleanly under those conditions, we'd have to adopt The trade-offs don't seem worthwhile. It would slow down builds, increase install sizes, and create ongoing maintenance overhead. I'll convert this to a discussion so we can track interest and revisit the topic if there's strong demand, but for now this is a known limitation of how our type setup works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
According to the
package.jsonofpayloadcms/live-previewthere are no dependencies.However the file types.ts has a type import from the
payloadpackage.This results in build failures when
payloadis not installed (unlessskipLibis set of course which should not be the goal).Imports from the
payloadpackage should be omitted.Link to the code that reproduces this issue
https://stackblitz.com/edit/payload-cms-live-preview-imports-from-payload-package?file=src%2Fmain.ts&view=editor
Reproduction Steps
npm install && npm startWhich area(s) are affected?
area: live-preview
Environment Info
Beta Was this translation helpful? Give feedback.
All reactions