Skip to content

Integration Overview

Choose the right plugin or compiler entry point.

@fluentic/style ships one package with isolated subpath exports for bundlers and compiler integrations.

ImportPurpose
@fluentic/style/plugin/nextjsNext.js App Router integration
@fluentic/style/plugin/viteVite plugin
@fluentic/style/plugin/rollupRollup plugin
@fluentic/style/plugin/webpackWebpack plugin
@fluentic/style/plugin/rspackRspack plugin
@fluentic/style/plugin/rolldownRolldown plugin
@fluentic/style/plugin/esbuildesbuild plugin
@fluentic/style/babelBabel plugin factory
@fluentic/style/compilerLow-level compiler API

Most bundler adapters are built from the same unplugin implementation. Next.js uses a dedicated adapter for App Router, RSC development CSS, production extraction, and static export.

The default entry import is:

import 'virtual:fluentic-styles';

Vite, Rollup, and Rolldown import the paired CSS virtual module automatically from the runtime virtual module. Other bundlers may need an explicit CSS import or adapter-specific CSS handling.

You can customize those IDs with runtimeModuleId and cssModuleId.

stylePlugin({
extract: true,
include: /\.[jt]sx?$/,
exclude: /node_modules/,
runtimeModuleId: 'virtual:fluentic-styles',
cssModuleId: 'virtual:fluentic-styles.css',
});

See Plugin Options for the full shape.

For App Router projects, see the Next.js guide.