Skip to content

Commit

Permalink
Fix wrong plugin ordering
Browse files Browse the repository at this point in the history
Regression was introduced with #465 (unreleased)
  • Loading branch information
marvinhagemeister committed Mar 27, 2021
1 parent 5f648f3 commit fc5cf31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-grapes-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wmr': patch
---

Fix incorrect plugin ordering introduced in #465 (unreleased)
2 changes: 1 addition & 1 deletion packages/wmr/src/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function bundleProd({
});

// Plugins are pre-sorted
const split = plugins.findIndex(p => p.enforce !== 'post');
const split = plugins.findIndex(p => p.enforce === 'post');

const bundle = await rollup.rollup({
input,
Expand Down
2 changes: 1 addition & 1 deletion packages/wmr/src/wmr-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function wmrMiddleware({
root = root || cwd;

// Plugins are pre-sorted
const split = plugins.findIndex(p => p.enforce !== 'post');
const split = plugins.findIndex(p => p.enforce === 'post');
const NonRollup = createPluginContainer(
[
...plugins.slice(0, split),
Expand Down

0 comments on commit fc5cf31

Please sign in to comment.