Skip to content

Simple plugin to externalize all dependencies from bundling using Vite.

Notifications You must be signed in to change notification settings

rafalkrawiec/vite-externalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite Externalizer

This is very simple plugin to externalize all dependencies within your package, so they're not being bundled. You don't have to define rollupOptions.external within your vite.config.ts.

What's the purpose

When developing some complex packages with quite large amount of dependencies we have found that's really hard to exclude all of them from bundling, mainly because some of those dependencies also might have another dependencies, and it's a nightmare to exclude them all manually.

How to use

Simply add the plugin to your vite config file and that's it. There are no options available, as with our approach we don't need any as we always want to exclude all third party dependencies.

// vite.config.ts
import { defineConfig } from 'vite';
import { externalizer } from '@plenny/vite-externalizer';

export default defineConfig({
  plugins: [
    externalizer(),
  ],
});

About

Simple plugin to externalize all dependencies from bundling using Vite.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published