DEV Community

Discussion on: Sapper(svelte) + CodyFrame Ui

Collapse
 
zakariachahboun profile image
zakaria chahboun • Edited

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:

// 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!