Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Awesome Vite | 10,372 | a day ago | 41 | mit | JavaScript | |||||
⚡️ A curated list of awesome things related to Vite.js | ||||||||||
Wmr | 4,842 | 4 | a month ago | 16 | September 19, 2021 | 88 | mit | JavaScript | ||
👩🚀 The tiny all-in-one development tool for modern web apps. | ||||||||||
Plugins | 3,248 | 48 | 26,297 | 20 hours ago | 37 | September 12, 2022 | 36 | mit | JavaScript | |
🍣 The one-stop shop for official Rollup plugins | ||||||||||
Figmatocode | 2,969 | a month ago | 24 | gpl-3.0 | TypeScript | |||||
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI. | ||||||||||
Awesome | 2,181 | 2 months ago | 7 | mit | ||||||
⚡️ Delightful Rollup Plugins, Packages, and Resources | ||||||||||
Chimee | 2,106 | 18 | 20 | 3 years ago | 68 | June 15, 2020 | 30 | mit | JavaScript | |
a video player framework aims to bring wonderful experience on browser | ||||||||||
Awesome F2e Libs | 1,465 | a year ago | 2 | |||||||
🎉 整理我平时关注的前端库。 | ||||||||||
Vue I18n Next | 1,335 | 3,617 | 2,295 | 9 hours ago | 258 | July 12, 2022 | 94 | mit | TypeScript | |
Vue I18n for Vue 3 | ||||||||||
Rollup Plugin Visualizer | 1,334 | 851 | 1,403 | 20 days ago | 94 | July 15, 2022 | 10 | mit | TypeScript | |
📈⚖️ Visuallize your bundle | ||||||||||
Rollup Plugin Typescript2 | 781 | 6,388 | 16,255 | 17 days ago | 73 | June 06, 2022 | 25 | mit | TypeScript | |
Rollup plugin for typescript with compiler errors. |
Server-side rendering of Svelte app at build-time using Rollup plugin
Let's assume that we have basic svelte component src/App.svelte
:
<script>
export let name;
</script>
<div>{name}</div>
<style>
div {
color: red;
}
</style>
Let's use rollup-plugin-svelte-ssr
in rollup.config.js
:
// ... other imports
import ssr from "rollup-plugin-svelte-ssr";
export default {
input: "src/App.svelte",
output: {
format: "cjs",
file: "dist/ssr.js"
},
plugins: [
svelte({
generate: "ssr"
}),
// ... other plugins
ssr({
fileName: 'ssr.html',
props: {
name: 'Hello',
}
})
]
}
In dist
directory we get ssr.html
that contains SSR-ed app:
<style>div.svelte-6xs8g3{color:red}</style><div class="svelte-6xs8g3">Hello</div>
ssr({
// allow to set output file name
fileName: 'ssr.html',
// or
// where entry is Rollup entry
fileName: function(entry) {
return "ssr.html"
}
// root component props
props: {
name: 'Hello',
},
// allow to skip emit of js file
skipEmit: false,
// allow to preprocess html
preprocessHtml: function(html) {
return html;
},
// allow to preprocess css
preprocessCss: function(css) {
return css;
},
// customize output
configureExport: function(html, css) {
return `<style>${css}</style>${html}`;
}
})