Skip to content

Commit fb578a9

Browse files
committed
Update svelte tooling
1 parent c6431a7 commit fb578a9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

rollup.config.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import resolve from '@rollup/plugin-node-resolve'
33
import commonjs from '@rollup/plugin-commonjs'
44
import livereload from 'rollup-plugin-livereload'
55
import { terser } from 'rollup-plugin-terser'
6+
import css from 'rollup-plugin-css-only'
67

78
const production = !process.env.ROLLUP_WATCH
89

@@ -37,15 +38,18 @@ export default {
3738
},
3839
plugins: [
3940
svelte({
40-
// enable run-time checks when not in production
41-
dev: !production,
42-
// we'll extract any component CSS out into
43-
// a separate file - better for performance
44-
css: css => {
45-
css.write('bundle.css')
46-
}
41+
compilerOptions: {
42+
// enable run-time checks when not in production
43+
dev: !production,
44+
css: false
45+
},
46+
emitCss: true
4747
}),
4848

49+
// we'll extract any component CSS out into
50+
// a separate file - better for performance
51+
css({ output: 'bundle.css' }),
52+
4953
// If you have external dependencies installed from
5054
// npm, you'll most likely need these plugins. In
5155
// some cases you'll need additional configuration -

0 commit comments

Comments
 (0)