Skip to content

Commit

Permalink
build(ui): update configuration to reduce bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
aprendendofelipe committed Oct 3, 2024
1 parent 4fb2fdb commit b1abf7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ export default defineConfig({
formats: ['cjs'],
},
rollupOptions: {
external: ['@primer/react', 'styled-components', 'react', 'react-dom', 'next/document.js'],
external: [/^react/, /^next\//, /^@primer\//, /^styled-components/],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
externalLiveBindings: false,
reexportProtoFromExternal: false,
},
},
},
Expand Down

0 comments on commit b1abf7c

Please sign in to comment.