Closed andybluntish closed 3 years ago
Hey @andybluntish sorry for the late reply here. I just pushed 0.3.0 which fixes this (I believe)
Can you retest?
I pushed a test confirming that this works in 0.3.0. Going to close for now but please reopen if you see issues!
After following along with the basic setup described in the blog post, everything was working great. When I setup a custom input directory in the
.eleventy.js
config (and moved the files) the component styles stopped working. The page and component rendered just fine, but only the page styles were being output fromgetVueComponentCssForPage
, and styles defined in the component were missing.I found that when I added a second component file to the
_includes
directory, the styles came back. I put some logging inEleventyVue.js
and noticed thatentry.imports
changed when I added the second component file, even though I wasn’t importing it into the page.Logging
entry.imports
for myindex.vue
page:with one file (component styles not working):
with two files (component styles are working):
It appears that the
normalize-component
file is not being created when there is only one include file component (confirmed by looking in the cache directory). Also, in the broken case, the hash is suspiciously being appended to the component file name. I’m not familiar enough with this to know whatnormalize-component
really does, but from what I’ve observed it certainly seems connected.