Great article. I'm working with Svelte / Routify, can I apply with it ?
Yes you can do this with Svelte too, But in "rollup.config.js" of Svelte, there is no server or client section like Sapper,
You have to install just two dependencies: npm install -D svelte-preprocess rollup-plugin-postcss
npm install -D svelte-preprocess rollup-plugin-postcss
You have to import these lines:
// sass to css import postcss from 'rollup-plugin-postcss' //sass import autoPreprocess from 'svelte-preprocess';
And in svelte({...}) add these lines:
preprocess: autoPreprocess(), emitCss: true
Also add these lines after svelte({..}):
postcss({ extract: true, minimize: true, use: [ ['sass', { includePaths: [ './src' ] }] ] })
And that's all!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article.
I'm working with Svelte / Routify, can I apply with it ?
Yes you can do this with Svelte too, But in "rollup.config.js" of Svelte, there is no server or client section like Sapper,
You have to install just two dependencies:
npm install -D svelte-preprocess rollup-plugin-postcss
You have to import these lines:
And in svelte({...}) add these lines:
Also add these lines after svelte({..}):
And that's all!