Skip to content

Commit dccde7e

Browse files
authored
Merge pull request #23 from rollup/gh-21
support preprocess option
2 parents e6c22b1 + 1267be8 commit dccde7e

File tree

6 files changed

+1528
-697
lines changed

6 files changed

+1528
-697
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ export default {
3434
// can also use the server-side rendering compiler
3535
generate: 'ssr',
3636

37+
// Optionally, preprocess components with svelte.preprocess:
38+
// https://github.com/sveltejs/svelte#preprocessor-options
39+
preprocess: {
40+
style: ({ content }) => {
41+
return transformStyles(content);
42+
}
43+
},
44+
3745
// Extract CSS into a separate file (recommended).
3846
// See note below
3947
css: function (css) {
@@ -42,7 +50,7 @@ export default {
4250

4351
// creates `main.css` and `main.css.map` — pass `false`
4452
// as the second argument if you don't want the sourcemap
45-
css.write('public/main.css');
53+
css.write('public/main.css');
4654
}
4755
})
4856
]

0 commit comments

Comments
 (0)