Skip to content

Commit

Permalink
fix: rollup replaceMoment not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Apr 17, 2022
1 parent 1ba0d7c commit 7e2bc8b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ export default createUnplugin<Options>((options) => {
return null
},
options: (options) => {
options.plugins = [
alias({
entries: {
moment: 'dayjs',
},
}),
...(options.plugins || []),
]
if (replaceMoment) {
options.plugins = [
alias({
entries: {
moment: 'dayjs',
},
}),
...(options.plugins || []),
]
}
return options
},
},
Expand Down

1 comment on commit 7e2bc8b

@vercel
Copy link

@vercel vercel bot commented on 7e2bc8b Apr 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.