-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: simplify api.js bundling (#4277)
Co-authored-by: Jonas Kruckenberg <iterpre@protonmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
- Loading branch information
1 parent
d4cac20
commit 1129f4f
Showing
15 changed files
with
669 additions
and
2,322 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"api": minor | ||
--- | ||
|
||
**Breaking change:** Node.js v12 is no longer supported. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
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,16 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2020", | ||
"module": "esnext", | ||
"strict": true, | ||
"allowJs": true, | ||
"esModuleInterop": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"types": ["@types"] | ||
}, | ||
"declaration": true, | ||
"declarationDir": "dist", | ||
"rootDir": "src", | ||
"moduleResolution": "node" | ||
}, | ||
"include": ["./src"] | ||
"moduleResolution": "node", | ||
"skipLibCheck": true, | ||
"noUnusedLocals": true, | ||
"noImplicitAny": true, | ||
"resolveJsonModule": true, | ||
"noEmit": true | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig(() => [ | ||
{ | ||
entry: ['src/*.ts'], | ||
outDir: 'dist', | ||
format: ['esm', 'cjs'], | ||
clean: true, | ||
minify: true, | ||
platform: 'browser', | ||
dts: { | ||
resolve: true | ||
} | ||
}, | ||
{ | ||
entry: { bundle: 'src/index.ts' }, | ||
outDir: '../../core/tauri/scripts', | ||
format: ['iife'], | ||
globalName: '__TAURI_IIFE__', | ||
clean: false, | ||
minify: true, | ||
platform: 'browser', | ||
dts: false, | ||
// esbuild `globalName` option generates `var __TAURI_IIFE__ = (() => {})()` | ||
// and var is not guaranted to assign to the global `window` object so we make sure to assign it | ||
footer: { | ||
js: 'window.__TAURI__ = __TAURI_IIFE__' | ||
} | ||
} | ||
]) |
Oops, something went wrong.