Sapper - Rollup환경에서 Sass 세팅
npm i -D svelte-preprocess autoprefixer node-sass 혹은
yarn add -D svelte-preprocess autoprefixer node-sass
// Import sveltePreprocess
import sveltePreprocess from 'svelte-preprocess';
// Setup the preprocessing function
const preprocess = sveltePreprocess({
scss: {
includePaths: ['src'],
},
postcss: {
plugins: [require('autoprefixer')],
},
});
export default {
client: {
plugins: [
svelte({
// ...
preprocess, // <-- ADD THIS LINE
}),
},
server: {
plugins: [
svelte({
// ...
preprocess, // <-- HERE TOO
}),
],
},
};