Skip to content

Commit

Permalink
feat: support webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Apr 13, 2022
1 parent be2c38b commit e489412
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export default createUnplugin<Options>((options) => {
},
},
},
webpack(compiler) {
const { resolve } = compiler.options
resolve.alias = {
...resolve.alias,
moment: 'dayjs',
}
},
transformInclude(id) {
return id.includes(ENTRY_FILE_NAME)
},
Expand Down

0 comments on commit e489412

Please sign in to comment.