Skip to content

Commit

Permalink
feat: export unstyled
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Dec 19, 2024
1 parent 06886b4 commit 78c4296
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "cypress open --component",
"test:run": "cypress run --component -b chrome",
"prettier": "prettier --write src",
"build": "tsup && cp src/style.css dist/ReactToastify.css"
"build": "tsup && cp src/style.css dist/ReactToastify.css && rm dist/unstyled.css*"
},
"peerDependencies": {
"react": "^18 || ^19",
Expand Down Expand Up @@ -82,6 +82,11 @@
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./unstyled": {
"types": "./dist/unstyled.d.ts",
"import": "./dist/unstyled.mjs",
"require": "./dist/unstyled.js"
},
"./dist/ReactToastify.css": "./dist/ReactToastify.css",
"./ReactToastify.css": "./dist/ReactToastify.css",
"./package.json": "./package.json",
Expand Down
10 changes: 8 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,17 @@ export default defineConfig([
external: ['react'],
clean: ['dist']
},
{
...baseConfig,
injectStyle: false,
entry: { unstyled: 'src/index.ts' },
external: ['react'],
clean: ['dist']
},
{
...baseConfig,
entry: {
'use-notification-center/index':
'src/addons/use-notification-center/index.ts'
'use-notification-center/index': 'src/addons/use-notification-center/index.ts'
},
external: ['react', 'react-toastify'],
clean: ['addons'],
Expand Down

0 comments on commit 78c4296

Please sign in to comment.