Skip to content

Commit 78c4296

Browse files
committed
feat: export unstyled
1 parent 06886b4 commit 78c4296

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test": "cypress open --component",
2525
"test:run": "cypress run --component -b chrome",
2626
"prettier": "prettier --write src",
27-
"build": "tsup && cp src/style.css dist/ReactToastify.css"
27+
"build": "tsup && cp src/style.css dist/ReactToastify.css && rm dist/unstyled.css*"
2828
},
2929
"peerDependencies": {
3030
"react": "^18 || ^19",
@@ -82,6 +82,11 @@
8282
"import": "./dist/index.mjs",
8383
"require": "./dist/index.js"
8484
},
85+
"./unstyled": {
86+
"types": "./dist/unstyled.d.ts",
87+
"import": "./dist/unstyled.mjs",
88+
"require": "./dist/unstyled.js"
89+
},
8590
"./dist/ReactToastify.css": "./dist/ReactToastify.css",
8691
"./ReactToastify.css": "./dist/ReactToastify.css",
8792
"./package.json": "./package.json",

tsup.config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,17 @@ export default defineConfig([
4343
external: ['react'],
4444
clean: ['dist']
4545
},
46+
{
47+
...baseConfig,
48+
injectStyle: false,
49+
entry: { unstyled: 'src/index.ts' },
50+
external: ['react'],
51+
clean: ['dist']
52+
},
4653
{
4754
...baseConfig,
4855
entry: {
49-
'use-notification-center/index':
50-
'src/addons/use-notification-center/index.ts'
56+
'use-notification-center/index': 'src/addons/use-notification-center/index.ts'
5157
},
5258
external: ['react', 'react-toastify'],
5359
clean: ['addons'],

0 commit comments

Comments
 (0)