bundlers/rollup-compatible-features
The build features of the rollup and vite adapters: one plugin, typed by the shape both bundlers accept, that runs the shared transforms (Solid, Svelte, stylesheets, WebAssembly) and replaces the framework’s compile-time constants, plus the unplugin-vue plugin for Vue.
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| CreateRollupCompatibleFeaturePluginParams | Parameters for createRollupCompatibleFeaturePlugin. |
| CreateUnpluginVuePluginParams | Parameters for createUnpluginVuePlugin. |
| FeaturePluginContext | The part of a rollup or rolldown plugin context the feature plugin uses. |
| RollupCompatibleFeaturePlugin | The plugin createRollupCompatibleFeaturePlugin creates, in the shape rollup and vite both accept. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| createRollupCompatibleFeaturePlugin | Creates the plugin that runs the shared transforms in a rollup or vite build. - framework: 'solid' compiles .jsx / .tsx with babel-preset-solid, before the project’s TypeScript plugin. - framework: 'svelte' compiles .svelte components and .svelte.ts / .svelte.js modules. - styles, where CreateRollupCompatibleFeaturePluginParams.shouldCompileStylesheets says so, runs every stylesheet through PostCSS, Tailwind and CSS-module scoping and emits it as an asset, which ends up in styles.css. - wasm loads a .wasm module as its bytes. - A framework’s compile-time constants are replaced where CreateRollupCompatibleFeaturePluginParams.shouldReplaceDefines says so. |
| createUnpluginVuePlugin | Creates the unplugin-vue plugin of one bundler when the framework is Vue. |