ft-interactive / starter-kit

A template for IG pages
65 stars 15 forks source link

Add ignore glob pattern for preview files #353

Closed pandringa closed 3 months ago

pandringa commented 3 months ago

I've recently made a tweak to the ai2html script to generate .preview.html files that you can use to see how the ai2html embed will look on a page. While this is a helpful feature, we do not want to import these files into the projects — otherwise we're importing very long, unnecessary strings and adding about 1mb to the bundle size.

To avoid this, I'm using the Negative Patterns feature of Vite's import.meta.glob, to import .html files but ignore .preview.html files in the graphics/ glob expression.