Skip to content

Commit 17bf635

Browse files
Merge pull request #468 from preactjs/plugin-order-2
Fix wrong plugin ordering
2 parents 8e169bd + fc5cf31 commit 17bf635

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'wmr': patch
3+
---
4+
5+
Fix incorrect plugin ordering introduced in #465 (unreleased)

packages/wmr/src/bundler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function bundleProd({
8888
});
8989

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

9393
const bundle = await rollup.rollup({
9494
input,

packages/wmr/src/wmr-middleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function wmrMiddleware({
6666
root = root || cwd;
6767

6868
// Plugins are pre-sorted
69-
const split = plugins.findIndex(p => p.enforce !== 'post');
69+
const split = plugins.findIndex(p => p.enforce === 'post');
7070
const NonRollup = createPluginContainer(
7171
[
7272
...plugins.slice(0, split),

0 commit comments

Comments
 (0)