Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent user plugin order #465

Merged
merged 1 commit into from
Mar 27, 2021
Merged

Conversation

marvinhagemeister
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2021

🦋 Changeset detected

Latest commit: 0737249

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wmr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2021

Size Change: -2 B (0%)

Total Size: 693 kB

Filename Size Change
packages/wmr/wmr.cjs 660 kB -2 B (0%)
ℹ️ View Unchanged
Filename Size Change
examples/demo/dist/about/index.html 657 B 0 B
examples/demo/dist/assets/Calendar.********.css 702 B 0 B
examples/demo/dist/assets/style.********.css 386 B 0 B
examples/demo/dist/chunks/class-fields.********.js 201 B 0 B
examples/demo/dist/chunks/compat.********.js 15.3 kB 0 B
examples/demo/dist/chunks/index.********.js 200 B 0 B
examples/demo/dist/chunks/prerender.********.js 2.44 kB 0 B
examples/demo/dist/class-fields/index.html 635 B 0 B
examples/demo/dist/compat/index.html 1.49 kB 0 B
examples/demo/dist/env/index.html 712 B 0 B
examples/demo/dist/error/index.html 646 B 0 B
examples/demo/dist/files/index.html 675 B 0 B
examples/demo/dist/index.********.js 7.19 kB 0 B
examples/demo/dist/index.html 703 B 0 B
examples/demo/dist/lazy-and-late/index.html 658 B 0 B

compressed-size-action

@marvinhagemeister marvinhagemeister merged commit 8b64020 into main Mar 27, 2021
@marvinhagemeister marvinhagemeister deleted the consitent-plugin-order branch March 27, 2021 11:53
@github-actions github-actions bot mentioned this pull request Mar 27, 2021
@@ -87,14 +87,16 @@ export async function bundleProd({
input.push('./' + pathToPosix(relative(root, abs)));
});

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait this doesn't make sense. The condition should be inverted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's supposed to be !== 'pre' - the index that marks the end of the "pre" items.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically the first index of null/'normal'/'post'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo normal plugins should be moved to the start too. You'll usually want to intercept stuff before we'd internal plugins. It was one of the key learnings in vite

marvinhagemeister added a commit that referenced this pull request Mar 27, 2021
Regression was introduced with #465 (unreleased)
marvinhagemeister added a commit that referenced this pull request Mar 27, 2021
Regression was introduced with #465 (unreleased)
marvinhagemeister added a commit that referenced this pull request Mar 27, 2021
Regression was introduced with #465 (unreleased)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants