A Rollup and Vite plugin (v1.2.1, actively maintained) for loading Framework7 single-file components (.f7.html, .f7, .f7.js, .f7.jsx). It enables developers to write Framework7 router components in a Vue-like SFC format with template, script, and optional style blocks. Key differentiators: seamless integration with both Rollup and Vite, optional CSS emission, JSX support via Babel or esbuild, and compatibility with Framework7 v6. Releases are infrequent but stable, with minimal breaking changes.
npm install rollup-plugin-framework7Verified import paths — ran on the pinned version, not inferred.
Minimal Rollup configuration using rollup-plugin-framework7 with CSS emission enabled.
Upgrade to v2.0.0+ when released and ensure Rollup >= 3 and Vite >= 4.
Use const framework7 = require('rollup-plugin-framework7').default;Add a CSS plugin to your Rollup configuration: import css from 'rollup-plugin-css'; and include it after framework7.
Install @rollup/plugin-babel, @babel/preset-react, @babel/preset-env and add babel() plugin with presets.
Run: npm install rollup-plugin-framework7 --save-dev
Use import framework7 from 'rollup-plugin-framework7' (no curly braces).
Use const framework7 = require('rollup-plugin-framework7').default;Install and add @rollup/plugin-babel with @babel/preset-react and @babel/preset-env.