From 01e42dc2928947913736d8678e2cd1463cb7d3d5 Mon Sep 17 00:00:00 2001 From: Miyamae Yuuya Date: Thu, 21 Mar 2024 01:45:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20esm=20=E3=81=8C=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E3=81=ABimport=20=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E4=BF=AE=E6=AD=A3=20(#1506)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: esm build 修正 * fix * fix * Create old-impalas-hug.md * fix: ignore config crate-ci/typos --- .changeset/old-impalas-hug.md | 5 +++++ .ignore | 1 + packages/for-ui/package.json | 3 ++- packages/for-ui/vite.config.ts | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/old-impalas-hug.md create mode 100644 .ignore diff --git a/.changeset/old-impalas-hug.md b/.changeset/old-impalas-hug.md new file mode 100644 index 000000000..c9bde0b2f --- /dev/null +++ b/.changeset/old-impalas-hug.md @@ -0,0 +1,5 @@ +--- +"@4design/for-ui": patch +--- + +fix: esm が正常にimport できない問題修正 diff --git a/.ignore b/.ignore new file mode 100644 index 000000000..016701f1b --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +**/CHANGELOG.md diff --git a/packages/for-ui/package.json b/packages/for-ui/package.json index dbd785580..4f770f7f2 100644 --- a/packages/for-ui/package.json +++ b/packages/for-ui/package.json @@ -16,7 +16,8 @@ "exports": { ".": { "import": "./dist/esm/for-ui.esm.js", - "require": "./dist/commonjs/for-ui.js" + "require": "./dist/commonjs/for-ui.js", + "types": "./dist/types/index.d.ts" }, "./tailwind.config.base.js": "./tailwind.config.base.js" }, diff --git a/packages/for-ui/vite.config.ts b/packages/for-ui/vite.config.ts index e3e7cde60..fc4411f02 100644 --- a/packages/for-ui/vite.config.ts +++ b/packages/for-ui/vite.config.ts @@ -14,6 +14,7 @@ export default defineConfig(({ mode }) => ({ lib: { entry: path.resolve(__dirname, 'src/index.ts'), name: 'for-ui', + fileName: (format) => `for-ui${format === 'esm' ? '.esm' : ''}.js`, }, rollupOptions: { external: regexesOfPackages,