mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 23:54:44 +12:00
build(ui): tree-shake ui components
This commit is contained in:
parent
d033f925e0
commit
5351ab429b
2 changed files with 22 additions and 4 deletions
|
@ -15,11 +15,11 @@
|
|||
"chromatic": "chromatic"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "./dist/ui.js",
|
||||
"main": "./dist/index.js",
|
||||
"typings": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/ui.js"
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"directories": {
|
||||
|
|
|
@ -8,10 +8,28 @@ export default defineConfig({
|
|||
plugins: [dts(), react(), Unocss({ include: ['.storybook/preview.ts'], configFile: '../../unocss.config.ts' })],
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/lib/index.ts'),
|
||||
entry: [
|
||||
'src/lib/index.ts',
|
||||
'src/lib/components/Alert.tsx',
|
||||
'src/lib/components/Section.tsx',
|
||||
'src/lib/components/discord/Message.tsx',
|
||||
'src/lib/components/discord/MessageAuthor.tsx',
|
||||
'src/lib/components/discord/MessageAuthorReply.tsx',
|
||||
'src/lib/components/discord/MessageBaseReply.tsx',
|
||||
'src/lib/components/discord/MessageEmbed.tsx',
|
||||
'src/lib/components/discord/MessageEmbedAuthor.tsx',
|
||||
'src/lib/components/discord/MessageEmbedField.tsx',
|
||||
'src/lib/components/discord/MessageEmbedFields.tsx',
|
||||
'src/lib/components/discord/MessageEmbedFooter.tsx',
|
||||
'src/lib/components/discord/MessageEmbedImage.tsx',
|
||||
'src/lib/components/discord/MessageEmbedThumbnail.tsx',
|
||||
'src/lib/components/discord/MessageEmbedTitle.tsx',
|
||||
'src/lib/components/discord/MessageInteraction.tsx',
|
||||
'src/lib/components/discord/MessageReply.tsx',
|
||||
'src/lib/components/discord/Messages.tsx',
|
||||
],
|
||||
formats: ['es'],
|
||||
name: 'ui',
|
||||
fileName: 'ui',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [
|
||||
|
|
Loading…
Reference in a new issue