createRollupCompatibleFeaturePlugin
Creates the plugin that runs the shared transforms in a rollup or vite build.
framework: 'solid'compiles.jsx/.tsxwithbabel-preset-solid, before the project’s TypeScript plugin. -framework: 'svelte'compiles.sveltecomponents and.svelte.ts/.svelte.jsmodules. -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 instyles.css. -wasmloads a.wasmmodule as its bytes. - A framework’s compile-time constants are replaced where CreateRollupCompatibleFeaturePluginParams.shouldReplaceDefines says so.
Import:
import { createRollupCompatibleFeaturePlugin } from '@mnaoumov/obsidian-dev-toolkit/bundlers/rollup-compatible-features';Signature:
function createRollupCompatibleFeaturePlugin(params: CreateRollupCompatibleFeaturePluginParams): RollupCompatibleFeaturePluginParameters:
| Parameter | Type | Description |
|---|---|---|
params |
CreateRollupCompatibleFeaturePluginParams | The CreateRollupCompatibleFeaturePluginParams. |
Returns: RollupCompatibleFeaturePlugin — The plugin.
Links to this page: