Skip to content

Commit

Permalink
refactor: rename defineUnplugin to createUnplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 12, 2021
1 parent 8273ae6 commit 0104790
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
## Usage

```ts
import { defineUnplugin } from 'unplugin'
import { createUnplugin } from 'unplugin'

const plugin = defineUnplugin((options: UserOptions) => {
const plugin = createUnplugin((options: UserOptions) => {
return {
name: 'my-first-unplugin',
// webpack's id filter is outside of loader logic,
Expand Down
5 changes: 0 additions & 5 deletions siroc.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getRollupPlugin } from './rollup'
import { UnpluginInstance, UnpluginFactory } from './types'
import { getWebpackPlugin } from './webpack'

export function defineUnplugin<UserOptions = {}> (
export function createUnplugin<UserOptions = {}> (
factory: UnpluginFactory<UserOptions>
): UnpluginInstance<UserOptions> {
return {
Expand Down

0 comments on commit 0104790

Please sign in to comment.