zephyr-rolldown-plugin
v0.1.10
Published
Rolldown plugin for Zephyr
Readme
Zephyr Rolldown Plugin
Zephyr Cloud | Zephyr Docs | Discord | Twitter | LinkedIn
A Rolldown plugin for deploying applications with Zephyr Cloud. This plugin enables seamless deployment of your Rolldown-built applications to Zephyr's global edge network.
For more information, please refer to our documentation for rolldown.
Note: This plugin is currently in development (WIP - Work In Progress).
Installation
# npm
npm install --save-dev zephyr-rolldown-plugin
# yarn
yarn add --dev zephyr-rolldown-plugin
# pnpm
pnpm add --dev zephyr-rolldown-plugin
# bun
bun add --dev zephyr-rolldown-pluginUsage
Add the plugin to your Rolldown configuration:
// rolldown.config.mjs
import { defineConfig } from 'rolldown';
import { withZephyr } from 'zephyr-rolldown-plugin';
export default defineConfig({
input: 'src/main.tsx',
plugins: [
{
name: 'emit-html',
generateBundle() {
const html = `
<html>
<body>
<div id="root"></div>
<script type="module" src="./main.js"></script>
</body>
</html>
`;
this.emitFile({
type: 'asset',
fileName: 'index.html',
source: html,
});
},
},
withZephyr(), // Add Zephyr plugin
],
});TypeScript Configuration
// rolldown.config.ts
import { defineConfig } from 'rolldown';
import { withZephyr } from 'zephyr-rolldown-plugin';
export default defineConfig({
input: 'src/main.tsx',
plugins: [
// ... other plugins
withZephyr(),
],
});Features
- 🚀 Automatic deployment during build
- 📦 Asset optimization and bundling with Rolldown
- 🔧 Zero-config setup
- 📊 Build analytics and monitoring
- 🌐 Global CDN distribution
- ⚡ Fast builds with Rolldown's Rust-based bundler
Getting Started
- Install the plugin in your Rolldown project
- Add it to your Rolldown configuration
- Build your application as usual
- Your app will be automatically deployed to Zephyr Cloud
Build Scripts
Add these scripts to your package.json:
{
"scripts": {
"dev": "rolldown --watch",
"build": "rolldown",
"build:prod": "NODE_ENV=production rolldown"
}
}Requirements
- Rolldown (latest version)
- Node.js 18 or higher
- Zephyr Cloud account (sign up at zephyr-cloud.io)
Status
This plugin is currently in active development. Features and API may change as Rolldown evolves. We're working closely with the Rolldown team to ensure optimal integration.
Examples
Check out our examples directory for complete working examples:
- rolldown-react - Basic React setup with Rolldown and Zephyr
Contributing
We welcome contributions! Please read our contributing guidelines for more information.
License
Licensed under the Apache-2.0 License. See LICENSE for more information.
