patternlab-node
patternlab-node copied to clipboard
View Pattern Info toggles broken when using Incremental Builds
The view pattern info toggle is broken when using incremental builds. Saving a watched pattern fixes it for that individual pattern.
version: v3.0.0-alpha.5 cleanPublic: false (in config)
DevTools error:
Hi @danwhite85
First off, thanks so much for giving the alpha a shot! It's quite a bit of a shake up, and admittedly a WIP in places.
I'll take a look at this as soon as available.
After some more testing, it doesn't seem to be directly related to incremental builds.
The issue is that pl-pattern-data for patterns does not get populated in styleguide.html if the public folder exists on serve.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I can confirm that there's definitely an issue with the Pattern "Extras" Toggle in the latest code up on master. Still digging into this but @danwhite85's comment about missing data gives me a couple ideas to try out. Hang tight!
To add to this one, when using patternlab.build()
directly, if you pass in cleanPublic: true
patternData
is populated and the extras toggle works correctly (because pl-js-pattern-data
div is populated with the patternData
variable in patternSection.mustache
).
If you pass in cleanPublic: false
then patternData
is not populated which means the patternSection.mustache
doesn't render the patternData
variable.
This does effectively mean you can't use incremental builds unless you don't really care about seeing the extras info.