A Browserify transform allowing you to require Svelte templates.
Defaults to transforming all .html
and .svelte
files. You can overwrite the transformed extensions with the extensions
argument.
browserify -t [ sveltify --extensions [.htmlz .svelte] ] myfile.js
{
"browserify": {
"transform": [
[
"sveltify",
{
"extensions": [
".html",
".svelte"
]
}
]
]
}
}
Pass options to the Svelte compiler with the svelte
property:
browserify -t [ sveltify --svelte [ --dev=true ] ] myfile.js
{
"browserify": {
"transform": [
[
"sveltify",
{
"svelte": {
"dev": true
}
}
]
]
}
}