Svelte · Middle · Question 53 of 75

What does <script module> do?

Explanation

In Svelte 4 this was <script context="module">. Use it for shared constants, helpers or exported snippets.

Further reading

Problem with a question

Svelte · Middle · question 53

Test yourself

Take the Svelte · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz