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,