-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shaun Lloyd
committed
Jan 19, 2024
1 parent
0b230de
commit 8889991
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
if (module && module.hot && module.hot.decline) { | ||
module.hot.decline() | ||
} | ||
|
||
// make it work with --isolatedModules | ||
export default {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2022", | ||
"module": "ES2022", | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"incremental": false, | ||
"isolatedModules": true, | ||
"jsx": "react", | ||
} | ||
"module": "ES2022", | ||
"moduleResolution": "node", | ||
"rootDir": "./src", | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "ES2022", | ||
}, | ||
"include": ["src/**/*"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { defineConfig } from "tsup" | ||
|
||
export default defineConfig(() => { | ||
export default defineConfig((options) => { | ||
return { | ||
dts: { entry: ["src/index.ts", "src/manager.ts", "src/preview.ts"] }, | ||
entry: ["src/index.ts", "src/manager.ts", "src/preview.ts"], | ||
format: ["esm", "cjs"], | ||
splitting: false, | ||
minify: !options.watch, | ||
treeshake: true, | ||
sourcemap: true, | ||
clean: true, | ||
platform: "browser", | ||
esbuildOptions(options) { | ||
options.conditions = ["module"]; | ||
}, | ||
} | ||
}) |