This preprocessor allows you to use angular2+ like component layout
Example:
project
| App.svelte
| main.ts
--- component
| component.html
| component.scss
| component.svelte
And now you can import this component as nested like:
import Component from './component/component.svelte'
- Copy and throw this file (name as you like, i.e. 'svelte.combiner.js' ) in the folder with rollup.config.js.
- After first step import it on rollup.config.js file. In example:
import svelteCombiner from './svelte-combiner';
- Put it on plugins array before svelte({... . In Example:
...
plugins: [
svelteCombiner(),
svelte({
...
]
...
- Try to run it. It should just work.