Skip to content

Commit

Permalink
Export node modules
Browse files Browse the repository at this point in the history
  • Loading branch information
garryxiao committed Jan 11, 2025
1 parent 99a7df5 commit 1cd1a08
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"name": "@etsoo/react",
"version": "1.8.22",
"version": "1.8.23",
"description": "TypeScript ReactJs UI Independent Framework",
"main": "lib/index.js",
"type": "module",
"types": "lib/index.d.ts",
"main": "lib/cjs/index.js",
"module": "lib/mjs/index.js",
"types": "lib/mjs/index.d.ts",
"exports": {
".": {
"import": "./lib/mjs/index.js",
"require": "./lib/cjs/index.js"
}
},
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
"test": "vitest"
},
"repository": {
Expand Down
20 changes: 20 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
"target": "ES2020",
"allowJs": false,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"outDir": "./lib/cjs",
"noEmit": false,
"declaration": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": false,
"jsx": "react-jsx",
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"moduleResolution": "bundler",
"allowJs": false,
"isolatedModules": true,
"outDir": "./lib",
"outDir": "./lib/mjs",
"noEmit": false,
"declaration": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"skipLibCheck": false,
"jsx": "react-jsx",
"forceConsistentCasingInFileNames": true
},
Expand Down

0 comments on commit 1cd1a08

Please sign in to comment.