Use the Svelte compiler to build your .svelte
files from source.
npm install --save-dev @snowpack/plugin-svelte
// snowpack.config.json
{
"plugins": [["@snowpack/plugin-svelte", { /* see "Plugin Options" below */}]]
}
{
// Matches all ".svelte" files
"scripts": {"build:svelte": "@snowpack/plugin-svelte"}
}
You can override this by setting your own "@snowpack/plugin-svelte"
build script.
All plugin options
are passed directly to the Svelte compiler. See here for a list of supported options.