Skip to content

Commit

Permalink
refactor: remove enum fix (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jul 17, 2023
1 parent 742afab commit 692c112
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@ const getRollupConfig = async (
},
}

const fixEnumDeclaration: Plugin = {
name: 'tsup:fix-enum-declaration',
renderChunk(code) {
// make sure enum declaration starts with `declare`
// #834
return code.replace(/^(\s*)enum\s/gm, '$1declare enum ')
},
}

return {
inputConfig: {
input: dtsOptions.entry,
Expand Down Expand Up @@ -181,7 +172,6 @@ const getRollupConfig = async (
target: ts.ScriptTarget.ESNext,
},
}),
fixEnumDeclaration,
].filter(Boolean),
external: [
// Exclude dependencies, e.g. `lodash`, `lodash/get`
Expand Down

0 comments on commit 692c112

Please sign in to comment.