这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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