Skip to content

Commit

Permalink
chore: remove peer dependencies from bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil committed Jan 15, 2025
1 parent bd5a94a commit 537fed6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "welcome-ui",
"version": "1.0.0-beta.6",
"version": "1.0.0-beta.8",
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion lib/src/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const createTheme = (options: ThemeProps = {}): ThemeValues => {
theme.links = getLinks(theme)
theme.loaders = getLoaders(theme)
theme.modals = getModals(theme)
theme.pagination = getPagination(theme)
theme.paginations = getPagination(theme)
theme.popovers = getPopovers(theme)
theme.radios = getRadios(theme)
theme.radiosTab = getRadioTabs(theme)
Expand Down
28 changes: 27 additions & 1 deletion lib/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,37 @@ export default defineConfig({
name: 'Welcome UI',
},
rollupOptions: {
external: ['react', '@xstyled/styled-components'],
external: [
'react',
'@xstyled/styled-components',
'@juggle/resize-observer',
'@xstyled/styled-components',
'copy-to-clipboard',
'date-fns',
'downshift',
'lottie-light-react',
'match-sorter',
'react-datepicker',
'react-dropzone',
'react-flatten-children',
'react-hot-toast',
'styled-components',
],
output: {
globals: {
react: 'React',
'@xstyled/styled-components': 'XStyled',
'@juggle/resize-observer': 'ResizeObserver',
'copy-to-clipboard': 'copyToClipboard',
'date-fns': 'DateFns',
downshift: 'Downshift',
'lottie-light-react': 'Lottie',
'match-sorter': 'matchSorter',
'react-datepicker': 'ReactDatepicker',
'react-dropzone': 'ReactDropzone',
'react-flatten-children': 'FlattenChildren',
'react-hot-toast': 'RHT',
'styled-components': 'Styled',
},
},
},
Expand Down

0 comments on commit 537fed6

Please sign in to comment.