Skip to content

Commit

Permalink
build: 🏗️ Support ESM imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0blu committed Aug 25, 2023
1 parent 2c6653b commit 1e83b08
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 17,578 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Lockfiles (not useful in a library)
/package-lock.json
/yarn.lock
/pnpm-lock.yaml

# Logs
logs
*.log
Expand Down Expand Up @@ -107,4 +112,4 @@ dist
.DS_Store
lib
*.tgz
.vscode
.vscode
8 changes: 7 additions & 1 deletion configs/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"compilerOptions": {
"target": "ES6",
"lib": ["ES6", "DOM"],
"moduleResolution": "Node",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"checkJs": true,
"allowJs": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"outDir": "../lib/esm",
"declarationDir": "../lib/esm/types",
"allowSyntheticDefaultImports": true
},
"include": ["../src/**/*"],
"include": ["../src/**/*"]
}
4 changes: 0 additions & 4 deletions configs/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"lib": ["ES6", "DOM"],
"target": "ES6",
"module": "CommonJS",
"moduleResolution": "Node",
"outDir": "../lib/cjs",
"declarationDir": "../lib/cjs/types"
}
Expand Down
7 changes: 7 additions & 0 deletions configs/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "../lib/esm",
"declarationDir": "../lib/esm/types"
}
}
Loading

0 comments on commit 1e83b08

Please sign in to comment.