Skip to content

Commit

Permalink
fix(icons-react): esm exports
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDeveloper committed Sep 27, 2024
1 parent 6cd6f4d commit 0fa3aa2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 15 additions & 3 deletions packages/icons-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@
"url": "git+https://github.com/tabler/tabler-icons.git",
"directory": "packages/icons-react"
},
"main": "./dist/cjs/tabler-icons-react.cjs",
"types": "./dist/esm/tabler-icons-react.d.ts",
"module": "./dist/esm/tabler-icons-react.mjs",
"main": "./dist/cjs/tabler-icons-react.js",
"types": "./dist/cjs/tabler-icons-react.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/tabler-icons-react.d.mts",
"default": "./dist/esm/tabler-icons-react.mjs"
},
"require": {
"types": "./dist/cjs/tabler-icons-react.d.ts",
"default": "./dist/cjs/tabler-icons-react.js"
}
}
},
"sideEffects": false,
"files": [
"dist"
Expand Down
6 changes: 3 additions & 3 deletions packages/icons-react/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const inputs = ['./src/tabler-icons-react.ts'];
const bundles = [
{
format: 'cjs',
extension: 'cjs',
extension: 'js',
inputs,
},
{
Expand All @@ -24,9 +24,9 @@ export default [
{
input: inputs[0],
output: [{
file: `dist/esm/${outputFileName}.d.ts`, format: 'esm'
file: `dist/esm/${outputFileName}.d.mts`, format: 'esm'
}, {
file: `dist/cjs/${outputFileName}.d.cts`, format: 'cjs'
file: `dist/cjs/${outputFileName}.d.ts`, format: 'cjs'
}],
plugins: [dts()],
},
Expand Down

0 comments on commit 0fa3aa2

Please sign in to comment.