Skip to content

Commit 7747918

Browse files
committed
fix: interop default for cjs
1 parent 771453e commit 7747918

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

src/esbuild.ts

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

3-
export default unplugin.esbuild
3+
const esbuild = unplugin.esbuild
4+
export default esbuild
5+
export { esbuild as 'module.exports' }

src/rolldown.ts

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

3-
export default unplugin.rolldown
3+
const rolldown = unplugin.rolldown
4+
export default rolldown
5+
export { rolldown as 'module.exports' }

src/rollup.ts

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

3-
export default unplugin.rollup
3+
const rollup = unplugin.rollup
4+
export default rollup
5+
export { rollup as 'module.exports' }

src/rspack.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Options } from './types'
2-
import unplugin from '.'
1+
import unplugin from './index'
32

4-
export default unplugin.rspack as (options?: Options) => any
3+
const rspack = unplugin.rspack
4+
export default rspack
5+
export { rspack as 'module.exports' }

src/vite.ts

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

3-
export default unplugin.vite
3+
const vite = unplugin.vite
4+
export default vite
5+
export { vite as 'module.exports' }

src/webpack.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { Options } from './types'
2-
import unplugin from '.'
1+
import unplugin from './index'
32

4-
export default unplugin.webpack as (options?: Options) => any
3+
const webpack = unplugin.webpack
4+
export default webpack
5+
export { webpack as 'module.exports' }

0 commit comments

Comments
 (0)