A parcel plugin that enables svelte support [CHANGELOG]
Currently only .svelte imports are supported, look at the example for details
yarn add parcel-plugin-svelte -D
or
npm install parcel-plugin-svelte -D
The default configuration should work for most people but I added the possibility to define your own config values any of through svelte.config.js
(preferred method), .svelterc
, or svelte
field in package.json
, for documentation on which parameters u can set and use look at the official svelte docs
// Used by svelte.compile
compilerOptions: {
...
},
// Used by svelte.preprocess
preprocess: {
...
}
If you set compilerOptions.css
false
, CSS will be bundled in a separate
file. It also enables post-transformations provided by Parcel such as PostCSS
and file resolution for url()
.
npm run example
MIT License