Skip to content

Commit

Permalink
chore: upgrade rollup-plugin-svelte version (sveltejs#185)
Browse files Browse the repository at this point in the history
* Remove use of soon to be removed css option

* Upgrade to rollup-plugin-svelte 7.0

* fix: use `compilerOptions` namespace

* no comment

Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
  • Loading branch information
benmccann and lukeed authored Nov 23, 2020
1 parent 431bd4d commit 44259cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.0.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^6.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0"
},
Expand Down
15 changes: 8 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import svelte from 'rollup-plugin-svelte';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';

const production = !process.env.ROLLUP_WATCH;

function serve() {
let server;

function toExit() {
if (server) server.kill(0);
}
Expand Down Expand Up @@ -38,13 +39,13 @@ export default {
plugins: [
svelte({
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
css: css => {
css.write('bundle.css');
compilerOptions: {
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),

// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
Expand Down

0 comments on commit 44259cf

Please sign in to comment.