Skip to content

Commit

Permalink
fix: define a build-time constant called TSUP_FORMAT
Browse files Browse the repository at this point in the history
  • Loading branch information
EGOIST committed May 5, 2022
1 parent df40e12 commit f4a56ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/esbuild/index.ts
Expand Up @@ -174,6 +174,7 @@ export async function runEsbuild(
: ['browser', 'module', 'main'],
plugins: esbuildPlugins.filter(truthy),
define: {
TSUP_FORMAT: JSON.stringify(format),
...(format === 'cjs' && injectShims
? {
'import.meta.url': 'importMetaUrl',
Expand Down

0 comments on commit f4a56ed

Please sign in to comment.