Skip to content

Commit

Permalink
feat: expose raw object
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 27, 2021
1 parent 9c12e84 commit 19a3768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export function createUnplugin<UserOptions = {}> (
},
get webpack () {
return getWebpackPlugin(factory)
},
get raw () {
return factory
}
}
}
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface UnpluginInstance<UserOptions> {
rollup: (options?: UserOptions) => RollupPlugin;
webpack: (options?: UserOptions) => any;
vite: (options?: UserOptions) => VitePlugin;
raw: UnpluginFactory<UserOptions>
}

declare module 'webpack' {
Expand Down

0 comments on commit 19a3768

Please sign in to comment.