Skip to content

Commit

Permalink
fix: add @rollup/plugin-commonjs before user plugin, let it correct… (
Browse files Browse the repository at this point in the history
#746)

fix #728
  • Loading branch information
underfin authored Sep 7, 2020
1 parent ec295aa commit f005c67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ export async function createBaseRollupPlugins(
const dynamicImport = require('rollup-plugin-dynamic-import-variables')

return [
// user plugins
...(rollupInputOptions.plugins || []),
// vite:resolve
createBuildResolvePlugin(root, resolver),
// vite:esbuild
Expand Down Expand Up @@ -176,7 +174,9 @@ export async function createBaseRollupPlugins(
warnOnError: true,
include: [/\.js$/],
exclude: [/node_modules/]
})
}),
// #728 user plugins should apply after `@rollup/plugin-commonjs`
...(rollupInputOptions.plugins || [])
].filter(Boolean)
}

Expand Down

0 comments on commit f005c67

Please sign in to comment.