• Version 7.2.2
  • Published
  • 15.3 kB
  • 2 dependencies
  • MIT license


npm i rollup-plugin-svelte
yarn add rollup-plugin-svelte
pnpm add rollup-plugin-svelte


Compile Svelte components with Rollup



function svelte

svelte: (options?: Partial<Options>) => Plugin;


    interface Options

    interface Options {}

      property compilerOptions

      compilerOptions: CompileOptions;
      • Options passed to svelte.compile method.

      property emitCss

      emitCss: boolean;
      • Emit Svelte styles as virtual CSS files for other plugins to process.

      property exclude

      exclude: Arrayable<string>;
      • One or more minimatch patterns

      property extensions

      extensions: string[];
      • By default, all ".svelte" files are compiled ['.svelte']

      property include

      include: Arrayable<string>;
      • One or more minimatch patterns

      property preprocess

      preprocess: Arrayable<PreprocessorGroup>;
      • Optionally, preprocess components with svelte.preprocess:

        See Also


      method onwarn

      onwarn: (warning: RollupWarning, handler: WarningHandler) => void;
      • Custom warnings handler; defers to Rollup as default.

      Type Aliases

      type Arrayable

      type Arrayable<T> = T | T[];

        type WarningHandler

        type WarningHandler = (warning: RollupWarning | string) => void;

          Package Files (1)

          Dependencies (2)

          Dev Dependencies (7)

          Peer Dependencies (2)


          To add a badge like this badgeto your package's README, use the codes available below.

          You may also use to create a custom badge linking to

          • Markdown
          • HTML
            <a href=""><img src="" alt=""></a>