Rolldown plugin for Zephyr
npm install zephyr-rolldown-pluginA 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).
``bashnpm
npm install --save-dev zephyr-rolldown-plugin
Usage
Add the plugin to your Rolldown configuration:
`javascript
// 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 =
;
this.emitFile({
type: 'asset',
fileName: 'index.html',
source: html,
});
},
},
withZephyr(), // Add Zephyr plugin
],
});
`$3
`typescript
// 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
1. Install the plugin in your Rolldown project
2. Add it to your Rolldown configuration
3. Build your application as usual
4. Your app will be automatically deployed to Zephyr Cloud
Build Scripts
Add these scripts to your
package.json:`json
{
"scripts": {
"dev": "rolldown --watch",
"build": "rolldown",
"build:prod": "NODE_ENV=production rolldown"
}
}
``- Rolldown (latest version)
- Node.js 18 or higher
- Zephyr Cloud account (sign up at zephyr-cloud.io)
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.
Check out our examples directory for complete working examples:
- rolldown-react - Basic React setup with Rolldown and Zephyr
We welcome contributions! Please read our contributing guidelines for more information.
Licensed under the Apache-2.0 License. See LICENSE for more information.