Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

feat(native-plugin): use js modulepreload polyfill plugin in dev environment#237

Merged
sapphi-red merged 1 commit into
rolldown-vitefrom
06-09-perf/remove-js-modulepreload-polyfill-plugin
Jun 12, 2025
Merged

feat(native-plugin): use js modulepreload polyfill plugin in dev environment#237
sapphi-red merged 1 commit into
rolldown-vitefrom
06-09-perf/remove-js-modulepreload-polyfill-plugin

Conversation

@shulaoda
Copy link
Copy Markdown
Member

@shulaoda shulaoda commented Jun 9, 2025

Description

  • Vite only used this plugin for build, so removing this plugin won't affect dev
  • The native plugin is fully aligned in build environment
    What I'm curious about is whether we can move it into resolveBuildPlugins.

The native plugin used internal context, so we use js plugin in dev environment.

@shulaoda shulaoda requested a review from sapphi-red June 9, 2025 01:19
@shulaoda shulaoda marked this pull request as draft June 9, 2025 01:29
@shulaoda shulaoda force-pushed the 06-09-perf/remove-js-modulepreload-polyfill-plugin branch from 021de39 to 88ad88c Compare June 9, 2025 01:36
@shulaoda shulaoda marked this pull request as ready for review June 9, 2025 01:36
@sapphi-red
Copy link
Copy Markdown
Member

This plugin is needed in dev because users can import vite/modulepreload-polyfill manually.
https://vite.dev/guide/backend-integration.html#backend-integration

@shulaoda shulaoda marked this pull request as draft June 9, 2025 02:44
@shulaoda shulaoda changed the title perf: remove js modulepreload polyfill plugin feat(native-plugin): use js modulepreload polyfill plugin in dev environment Jun 10, 2025
@shulaoda shulaoda force-pushed the 06-09-perf/remove-js-modulepreload-polyfill-plugin branch 2 times, most recently from af506ce to 6208586 Compare June 12, 2025 04:14
@shulaoda shulaoda force-pushed the 06-09-perf/remove-js-modulepreload-polyfill-plugin branch from 6208586 to 167ae1c Compare June 12, 2025 04:20
@shulaoda shulaoda marked this pull request as ready for review June 12, 2025 04:21
@sapphi-red sapphi-red merged commit d86c3bd into rolldown-vite Jun 12, 2025
18 checks passed
@sapphi-red sapphi-red deleted the 06-09-perf/remove-js-modulepreload-polyfill-plugin branch June 12, 2025 04:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants