Skip to content

Commit 9686025

Browse files
committed
refactor!: named export
1 parent 75d59ec commit 9686025

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

src/esbuild.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import unplugin from './index'
1+
import { IsolatedDecl } from './index'
22

3-
export default unplugin.esbuild as typeof unplugin.esbuild
3+
export default IsolatedDecl.esbuild as typeof IsolatedDecl.esbuild

src/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ import { createFilter } from '@rollup/pluginutils'
66
import { type Options, resolveOptions } from './core/options'
77
import type { Plugin } from 'rollup'
88

9-
declare module 'unplugin' {
10-
interface UnpluginBuildContext {
11-
id: number
12-
}
13-
}
9+
export type { Options }
1410

15-
export const plugin: UnpluginInstance<Options | undefined, false> =
11+
export const IsolatedDecl: UnpluginInstance<Options | undefined, false> =
1612
createUnplugin((rawOptions = {}, meta) => {
1713
const options = resolveOptions(rawOptions)
1814
const filter = createFilter(options.include, options.exclude)
@@ -128,8 +124,6 @@ export const plugin: UnpluginInstance<Options | undefined, false> =
128124
}
129125
})
130126

131-
export default plugin
132-
133127
function lowestCommonAncestor(...filepaths: string[]) {
134128
if (filepaths.length === 0) return ''
135129
if (filepaths.length === 1) return path.dirname(filepaths[0])

src/rolldown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import unplugin from './index'
1+
import { IsolatedDecl } from './index'
22

3-
export default unplugin.rolldown as typeof unplugin.rolldown
3+
export default IsolatedDecl.rolldown as typeof IsolatedDecl.rolldown

src/rollup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import unplugin from './index'
1+
import { IsolatedDecl } from './index'
22

3-
export default unplugin.rollup as typeof unplugin.rollup
3+
export default IsolatedDecl.rollup as typeof IsolatedDecl.rollup

src/vite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import unplugin from './index'
1+
import { IsolatedDecl } from './index'
22

3-
export default unplugin.vite as typeof unplugin.vite
3+
export default IsolatedDecl.vite as typeof IsolatedDecl.vite

0 commit comments

Comments
 (0)