Skip to content

Commit

Permalink
fix: exclude dependencies from the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
tigranpetrossian committed Aug 13, 2024
1 parent 0118d8b commit 8b882a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion figma-kit/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import tsconfigPaths from 'vite-tsconfig-paths';
import { dependencies } from './package.json';

const extensions: Record<string, string> = {
cjs: 'cjs',
Expand All @@ -25,7 +26,7 @@ export default defineConfig((env) => {
},
},
rollupOptions: {
external: ['react', 'react-dom', 'react/jsx-runtime'],
external: Object.keys(dependencies),
output: {
globals: {
react: 'React',
Expand Down

0 comments on commit 8b882a0

Please sign in to comment.