vite-legacy-pass-through - v1.3.0
    Preparing search index...

    Interface LegacyPassThroughOptions

    Options for the legacyPassThrough plugin.

    interface LegacyPassThroughOptions {
        libs: string[];
        excludeExtensions?: string[];
        matchBareImports?: boolean;
        apply?: "build" | "serve";
        showLog?: boolean;
    }
    Index
    libs: string[]

    List of library names to mark as external.

    Each entry must match the package name exactly as it appears in import statements. Subpath imports (lib/...) are always matched. Bare imports (lib without a subpath) require matchBareImports.

    Whitespace is trimmed and empty entries are ignored. At least one valid entry is required.

    libs: ['lib-legacy', 'another-old-lib']
    
    excludeExtensions?: string[]

    List of file extensions to exclude from pass-through.

    Imports whose path ends with any of these extensions are ignored by the plugin and left for Vite to handle normally (e.g. CSS, assets).

    Extensions must include the leading dot.

    ['.css', '.scss', '.sass', '.less', '.styl', '.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.woff', '.woff2', '.ttf', '.eot', '.json', '.html']

    excludeExtensions: ['.css', '.svg']
    
    matchBareImports?: boolean

    Also mark an exact, bare library import as external.

    false

    apply?: "build" | "serve"

    Controls when the plugin is applied.

    • 'build' — only during vite build (default). Prevents the plugin from interfering with dev tools that use Vite's dev server, such as Storybook.
    • 'serve' — only during vite dev / vite preview.

    'build'

    showLog?: boolean

    When true, logs each resolved import path to the console.

    Useful during development to verify which imports are being bypassed.

    false

    [vite-legacy-pass-through] Resolving: lib-legacy/components/Button
    [vite-legacy-pass-through] Resolving: lib-legacy/utils/format