Skip to content

Commit

Permalink
update svelte-rollup example
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Oct 13, 2021
1 parent e32412d commit 2628302
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 76 deletions.
2 changes: 1 addition & 1 deletion examples/svelte-rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"postcss": "^8.3.0",
"postcss-load-config": "^3.0.1",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-postcss": "^4.0.1",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0",
Expand Down
63 changes: 0 additions & 63 deletions examples/svelte-rollup/public/global.css

This file was deleted.

2 changes: 0 additions & 2 deletions examples/svelte-rollup/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<title>Svelte app</title>

<link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/build/bundle.css'>

<script defer src='/build/bundle.js'></script>
</head>
Expand Down
7 changes: 4 additions & 3 deletions examples/svelte-rollup/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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';
import postcss from 'rollup-plugin-postcss'
import sveltePreprocess from "svelte-preprocess";

const production = !process.env.ROLLUP_WATCH;
Expand Down Expand Up @@ -45,12 +45,13 @@ export default {
},
preprocess: sveltePreprocess({
sourceMap: !production,
postcss: true,
}),
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),
postcss({
plugins: []
}),

// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
Expand Down
6 changes: 0 additions & 6 deletions examples/svelte-rollup/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@
</div>

</main>

<style global>
@tailwind base;
@tailwind components;
@tailwind utilities;
</style>
3 changes: 2 additions & 1 deletion examples/svelte-rollup/src/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import App from './App.svelte';
import './style.css'

const app = new App({
target: document.body,
});

export default app;
export default app;
4 changes: 4 additions & 0 deletions examples/svelte-rollup/src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

0 comments on commit 2628302

Please sign in to comment.