Releases: JorgenVatle/meteor-vite
@meteor-vite/plugin-zodern-relay@1.1.0
Minor Changes
- 92a56a1: Infer architecture from both Vite environment context and older Vite SSR flags
vite-bundler@3.0.0
Major Changes
-
8010d5c: Serve Vite bundle directly as static assets in production.
Skipping the Meteor bundling/transpilation steps for significantly faster build and client load times. ⚡Upgrading to
v3
shouldn't require any changes to your application. But there are some changes that could potentially impact your users.- Most of your application assets will be served from
/vite-assets/<chunkFileName>.<css | js>
- If you're using a CDN and serve your app under multiple hostnames, you might want to load those assets from one host instead of relative to the current host. This can be done by setting
assetsBaseUrl
in yourmeteor-vite
plugin config. - Static assets served by Meteor does not have any CORS headers. You will have to apply these on your web server or use a CloudFlare transform rule if you're using a static host for your assets.
- If you're using a CDN and serve your app under multiple hostnames, you might want to load those assets from one host instead of relative to the current host. This can be done by setting
- Browser support for ESM is required. Global support is around 97% at the time of writing.
- Most of your application assets will be served from
Minor Changes
- ab461a9: Prefetch all Vite assets asynchronously in the background after initial page load.
- f2e0e9d: - Add Vite config option for bundling the Meteor server
- Use DDP instead of Node IPC for managing Vite Dev server status
- Prefetch all Vite production assets in the background using the lowest available link priority.
Patch Changes
- 84c1026: Reformat next versioning tags
- 531bacb: Fix issue where global meteor runtime variable would be accessed before being defined
- f597f09: Fix environment passthrough to Vite
- 350718c: Use sets instead of arrays for manifest imports cache to address duplicate imports.
- 05d7c1e: Use Vite plugin configuration instead of build-time environment variables for setting the base path and URL for assets
- 30d802a: Fix issue where client module entrypoints would not load in production mode
- 03f65a7: Prevent server builds from minifying function and contructor names
- e743310: Use any available IPC interface for workers instead of relying on one transport strategy
- b8f34bb: Correct path to dev server splash screen HTML asset
- 46b3682: Fix release process
- bcc58ae: Use Meteor's runtime config to resolve the path to Vite's bundle manifest
- 5e66985: Update serverEntry config option to use Vite SSR build internally
- b9a4271: Fix issue where server would exit prematurely if worker child process disconnects despite having an active DDP connection to the worker.
- e1778a9: Avoid running validation for package.json when running in production
- 6290956: Fix issue in Meteor v3 where Assets.getText() is no longer available.
- b1c7b7a: Prevent Vite dev server from launching a worker process before it is really necessary. Fixes an issue where test environments can get stuck waiting for the worker to exit.
- f3a2546: Include build metadata in version tag
- 98ca33a: Patch cacheable files in memory instead of trying to write to the target arch's program.json file which could be marked as read-only.
- ff6eee0: Unref child processes running in detached mode
- Allow disabling the Vite dev server through setting
METEOR_VITE_DISABLED
to any value.
- Allow disabling the Vite dev server through setting
- 99792ff: Prevent Meteor from disabling caching on asset files generated by Vite
vite-bundler@2.3.2
Patch Changes
- 8af5523: Add missing 'semver' dependency to build plugin npm dependencies
vite-bundler@2.3.1
Patch Changes
- d3c4bfa: Update package version requirements to allow packages from Meteor v2.16 and v3.1.
- Emit a warning message to the console when using a Vite version incompatible with the current Meteor release.
vite-bundler@2.3.0
Minor Changes
-
6900bcf: Use any available IPC interface for workers instead of relying on one transport strategy
- Automatically include React preamble in apps that depend on
@vitejs/plugin-react
. You no longer need to manually modify your Meteor HTML to inject this yourself. See migration steps below. - Use
semver
package instead of a custom parser when determining whethermeteor-vite
is out of date. - Use
package-lock.json
instead ofpackage.json
when determining whethermeteor-vite
is out of date. - Added a check to warn you if your app is missing
meteor-node-stubs
. Addresses some potentially confusing runtime errors: #239
Migration steps
If your app is using
@vitejs/plugin-react
and was created using the Meteor-Vite React example app,
make sure you remove theserver/react-refresh.js
compatability module from your app.// server/react-refresh.js - /** - * Inject React Refresh snippet into HTML served by Meteor in development mode. - * Without this snippet, React HMR will not work with Meteor-Vite. - * - * {@link https://github.com/JorgenVatle/meteor-vite/issues/29} - * {@link https://github.com/vitejs/vite-plugin-react/issues/11#discussion_r430879201} - */ - if (Meteor.isDevelopment) { - WebAppInternals.registerBoilerplateDataCallback('react-preamble', async (request, data) => { - const { host, port } = await getConfig(); - data.dynamicHead = data.dynamicHead || ''; - data.dynamicHead += ` - <script type="module"> - import RefreshRuntime from "http://${host}:${port}/@react-refresh" - RefreshRuntime.injectIntoGlobalHook(window) - window.$RefreshReg$ = () => {} - window.$RefreshSig$ = () => (type) => type - window.__vite_plugin_react_preamble_installed__ = true - </script> - ` - }) - }
The boilerplate is now added automatically by Meteor-Vite when
@vitejs/plugin-react
is detected as a dependency. - Automatically include React preamble in apps that depend on
meteor-vite@2.0.0
Major Changes
-
8010d5c: Serve Vite bundle directly as static assets in production.
Skipping the Meteor bundling/transpilation steps for significantly faster build and client load times. ⚡Upgrading to
v3
shouldn't require any changes to your application. But there are some changes that could potentially impact your users.- Most of your application assets will be served from
/vite-assets/<chunkFileName>.<css | js>
- If you're using a CDN and serve your app under multiple hostnames, you might want to load those assets from one host instead of relative to the current host. This can be done by setting
assetsBaseUrl
in yourmeteor-vite
plugin config. - Static assets served by Meteor does not have any CORS headers. You will have to apply these on your web server or use a CloudFlare transform rule if you're using a static host for your assets.
- If you're using a CDN and serve your app under multiple hostnames, you might want to load those assets from one host instead of relative to the current host. This can be done by setting
- Browser support for ESM is required. Global support is around 97% at the time of writing.
- Most of your application assets will be served from
Minor Changes
- f2e0e9d: - Add Vite config option for bundling the Meteor server
- Use DDP instead of Node IPC for managing Vite Dev server status
- Prefetch all Vite production assets in the background using the lowest available link priority.
- 436fd5b: Use ESBuild instead of Vite's SSR bundler for Meteor server bundle.
Patch Changes
- f597f09: Fix environment passthrough to Vite
- e743310: Use any available IPC interface for workers instead of relying on one transport strategy
- 5e66985: Update serverEntry config option to use Vite SSR build internally
- 079d1d7: Use Vite plugin configuration instead of build-time environment variables for setting the base path and URL for assets
- 8499c6a: Loosen peer dependency requirement for Vite to allow for use with Vite v5
meteor-vite@1.12.1
Patch Changes
- 32c6ee6: Use any available IPC interface for workers instead of relying on one transport strategy
meteor-vite@3.0.0-alpha.9
Patch Changes
- dbff7d8: Include hash in entry module filenames. Addresses a critical issue where older entry modules would be kept (almost) indefinitely by client and edge caches.
meteor-vite@3.0.0-alpha.8
Patch Changes
- 12398cb: Hotfix WebApp handler response call order and set an explicit content-type header for invalid Vite asset requests
meteor-vite@3.0.0-alpha.7
Patch Changes
- 86c0474: Fix call order for production Vite asset 404 middleware