Skip to content

Commit

Permalink
fix: de-default rollup-plugin-esbuild (resolves #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 18, 2021
1 parent 05dde2a commit e88fc72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/builder/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { rollup } from 'rollup'
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import alias from '@rollup/plugin-alias'
import esbuild from 'rollup-plugin-esbuild'
import _esbuild from 'rollup-plugin-esbuild'
import dts from 'rollup-plugin-dts'
import { relative, resolve } from 'pathe'
import consola from 'consola'
Expand All @@ -14,6 +14,9 @@ import { JSONPlugin } from './plugins/json'
import { rawPlugin } from './plugins/raw'
import { cjsPlugin } from './plugins/cjs'

// @ts-ignore https://github.com/unjs/unbuild/issues/23
const esbuild = _esbuild.default || _esbuild

export async function rollupBuild (ctx: BuildContext) {
if (ctx.stub) {
for (const entry of ctx.entries.filter(entry => entry.builder === 'rollup')) {
Expand Down

0 comments on commit e88fc72

Please sign in to comment.