• provides a way of excluding dependencies from the runtime code and output bundles.

    Parameters

    Returns Plugin

    a vite plugin

    Example

    import createExternal from 'vite-plugin-external';

    export default defineConfig({
    plugins: [
    createExternal({
    externals: {
    react: 'React'
    }
    })
    ],
    build: {
    cssCodeSplit: false,
    rollupOptions: {
    output: {
    manualChunks: undefined,
    assetFileNames: 'assets/[name][extname]',
    entryFileNames: '[name].js',
    format: 'iife'
    }
    }
    }
    });

Generated using TypeDoc