v0.4.0
Features
- Wrap variables defined in frontmatter inside a
metadata
object and export that from within a<script context="module">
block. This enables us to now use tools like Vite'simport.meta.glob('...', { import: 'metadata', eager: true })
to e.g. help render a list of available routes with whatever metadata was defined.
Fixes
- SvelTeX is now conscious of the fact that the
script
preprocessor might run twice on the same file, given that Svelte files may include one<script>
tag and one<script context="module">
tag. Previously, doing this could lead to problematic behavior with SvelTeX, e.g., importing a component twice, causing an error.
Full Changelog: v0.3.2...v0.4.0