11ty / eleventy-plugin-vue

Use Vue.js templates and Vue.js single file components in Eleventy.
196 stars 11 forks source link

This plugin should obey core Eleventy ignore rules for *.vue files #11

Closed andybluntish closed 2 years ago

andybluntish commented 4 years ago

When building from the project root, .vue files from inside node_modules are included (specifically I noticed test files from eleventy-plugin-vue itself). Although nothing ends up in the output directory, the components are compiled and present in the cache directory.

This is not a problem when a custom input directory has been configured (e.g. { dir: { input: 'src'} } in .eleventy.js config).

I discovered this while attempting to debug https://github.com/11ty/eleventy-plugin-vue/issues/10.

zachleat commented 3 years ago

Oh interesting yeah. I think this raises a much larger question about how this plugin should obey .eleventyignore and .gitignore rules (a la https://www.11ty.dev/docs/ignores/#ignore-template-files) and does not currently.

zachleat commented 3 years ago

One other thing that might be interesting is a configuration option to hardcode a per-project glob to find the vue files.

andybluntish commented 3 years ago

Yeah, I think respecting .eleventyignore and .gitignore would be great, and generally following the Eleventy conventions as much as possible—so adding .vue files works just like .njk or .liquid.

A configuration glob could be nice for advanced use cases too.

zachleat commented 2 years ago

This will ship with 0.6.0 and 1.0.0 (the 1.0 canaries already have it)

zachleat commented 2 years ago