From 5ee291bedeacbf2490e13164b5517004a7e5cee3 Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Wed, 15 Jan 2025 15:26:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20dist=20exports=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/spotty-bananas-shave.md | 5 +++++ docs/docs/react/components/AspectRatio.mdx | 2 +- packages/react/package.json | 23 +++++++++++++--------- packages/react/rollup.config.mjs | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 .changeset/spotty-bananas-shave.md diff --git a/.changeset/spotty-bananas-shave.md b/.changeset/spotty-bananas-shave.md new file mode 100644 index 000000000..eeefdb710 --- /dev/null +++ b/.changeset/spotty-bananas-shave.md @@ -0,0 +1,5 @@ +--- +'@modern-kit/react': patch +--- + +fix(react): dist exports 추가하여 SubPath 동작 개선 - @ssi02014 diff --git a/docs/docs/react/components/AspectRatio.mdx b/docs/docs/react/components/AspectRatio.mdx index a9d31677a..c0a0cf8ce 100644 --- a/docs/docs/react/components/AspectRatio.mdx +++ b/docs/docs/react/components/AspectRatio.mdx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { AspectRatio } from '@modern-kit/react'; +import { AspectRatio } from '@modern-kit/react' # AspectRatio diff --git a/packages/react/package.json b/packages/react/package.json index 9cd9b8c67..bf5975667 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -73,31 +73,36 @@ "require": "./dist/index.js", "import": "./dist/index.mjs" }, + "./dist": { + "types": "./dist/*", + "require": "./dist/*", + "import": "./dist/*" + }, "./components": { "types": "./dist/components/index.d.ts", "require": "./dist/components/index.js", "import": "./dist/components/index.mjs" }, - "./components/*": { - "types": "./dist/components/*/index.d.ts", - "require": "./dist/components/*/index.js", - "import": "./dist/components/*/index.mjs" + "./utils": { + "types": "./dist/utils/index.d.ts", + "require": "./dist/utils/index.js", + "import": "./dist/utils/index.mjs" }, "./hooks": { "types": "./dist/hooks/index.d.ts", "require": "./dist/hooks/index.js", "import": "./dist/hooks/index.mjs" }, + "./components/*": { + "types": "./dist/components/*/index.d.ts", + "require": "./dist/components/*/index.js", + "import": "./dist/components/*/index.mjs" + }, "./hooks/*": { "types": "./dist/hooks/*/index.d.ts", "require": "./dist/hooks/*/index.js", "import": "./dist/hooks/*/index.mjs" }, - "./utils": { - "types": "./dist/utils/index.d.ts", - "require": "./dist/utils/index.js", - "import": "./dist/utils/index.mjs" - }, "./utils/*": { "types": "./dist/utils/*/index.d.ts", "require": "./dist/utils/*/index.js", diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs index d60527b5e..2d341816d 100644 --- a/packages/react/rollup.config.mjs +++ b/packages/react/rollup.config.mjs @@ -55,7 +55,7 @@ export default { exclude: ['**/*.spec.tsx', '**/*.spec.ts', './src/_internal/test/*'], }), commonjs(), - esbuild({ minify: true }), + esbuild(), postcss({ modules: true, minimize: true, From e15c5f5b3ea4f953c05a328704c7200131c38091 Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Wed, 15 Jan 2025 16:16:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20exports=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/react/components/AspectRatio.mdx | 2 +- packages/react/package.json | 35 ++++------------------ 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/docs/docs/react/components/AspectRatio.mdx b/docs/docs/react/components/AspectRatio.mdx index c0a0cf8ce..a9d31677a 100644 --- a/docs/docs/react/components/AspectRatio.mdx +++ b/docs/docs/react/components/AspectRatio.mdx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { AspectRatio } from '@modern-kit/react' +import { AspectRatio } from '@modern-kit/react'; # AspectRatio diff --git a/packages/react/package.json b/packages/react/package.json index bf5975667..9b4dc65d5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -73,40 +73,15 @@ "require": "./dist/index.js", "import": "./dist/index.mjs" }, - "./dist": { + "./dist/*": { "types": "./dist/*", "require": "./dist/*", "import": "./dist/*" }, - "./components": { - "types": "./dist/components/index.d.ts", - "require": "./dist/components/index.js", - "import": "./dist/components/index.mjs" - }, - "./utils": { - "types": "./dist/utils/index.d.ts", - "require": "./dist/utils/index.js", - "import": "./dist/utils/index.mjs" - }, - "./hooks": { - "types": "./dist/hooks/index.d.ts", - "require": "./dist/hooks/index.js", - "import": "./dist/hooks/index.mjs" - }, - "./components/*": { - "types": "./dist/components/*/index.d.ts", - "require": "./dist/components/*/index.js", - "import": "./dist/components/*/index.mjs" - }, - "./hooks/*": { - "types": "./dist/hooks/*/index.d.ts", - "require": "./dist/hooks/*/index.js", - "import": "./dist/hooks/*/index.mjs" - }, - "./utils/*": { - "types": "./dist/utils/*/index.d.ts", - "require": "./dist/utils/*/index.js", - "import": "./dist/utils/*/index.mjs" + "./*": { + "types": "./dist/*/index.d.ts", + "require": "./dist/*/index.js", + "import": "./dist/*/index.mjs" }, "./package.json": "./package.json" },