sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
844 stars 103 forks source link

`context=module` must be quoted #804

Closed mustafa0x closed 10 months ago

mustafa0x commented 10 months ago

Describe the bug

[vite-plugin-svelte] Error while preprocessing ... If the context attribute is supplied, its value must be "module"
 16 |  
 17 |  <script context=module>
               ^
 18 |  import {writable} from 'svelte/store'
 19 |  

Quotes are now required, while they weren't.

System Info

npmPackages:
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.0 
    svelte: ^4.2.5 => 4.2.5 
    vite: ^5.0.0 => 5.0.0 
mustafa0x commented 10 months ago

<script context=module> is found ~50 times on github.

https://github.com/search?q=language%3Asvelte+%2F%3Cscript+context%3Dmodule%3E%2F&type=code

paulocoghi commented 10 months ago

This issue is now fixed in Svelte v4.2.6, with PR https://github.com/sveltejs/svelte/pull/9551, and it can be closed.