Bundler Plugin
The Bundler plugin minifies JavaScript, CSS, and HTML files after a build, keeping shipped assets small without external tools.
Features
Runs on
rfw buildduring the PostBuild step.
Minifies:
.jsfiles with a JavaScript minifier.
.cssfiles with a CSS minifier.
.htmlfiles with an HTML minifier.
Inline
<script>and<style>inside.rtmlare already minified at render time (not handled by this plugin).Skips Tailwind CSS files so the
tailwindplugin can process them.
Setup
Enable the plugin in rfw.json:
{
"plugins": {
"bundler": {}
}
}
Usage
Run a build:
rfw build
The plugin rewrites the build/ output with minified assets.
Example
build/static/app.js before:
function add ( a , b ){ return a + b ; }
After rfw build:
function add(a,b){return a+b}
Notes
- Skipped automatically in
rfw dev --debugto keep output readable.
- Use
rfw buildfor production-ready minified files.
- Does not bundle modules or resolve imports; it only minifies existing files.