Skip to content

Releases: JorgenVatle/meteor-vite

meteor-vite@3.1.2

04 Dec 13:15
df183d4
Compare
Choose a tag to compare

Patch Changes

  • 37cd122: Use package.json instead of global variable for determining current version of jorgenvatle:vite

meteor-vite@3.1.1

04 Dec 11:37
33ad430
Compare
Choose a tag to compare

Patch Changes

  • 7f19e6c: Emit an informational exception if Meteor build plugin is missing a client entry module runtime setting. Addresses an issue where updating meteor-vite without updating the build plugin to a version where version validation was added.
    • Added missing semver package to dependencies.

meteor-vite@3.1.0

04 Dec 08:50
d08da44
Compare
Choose a tag to compare

Minor Changes

  • e0b26dd: Inject module preload polyfill in client entrypoints unless explicitly disabled in Vite config.
    • Use built-in Vite error overlay when stub validation fails
    • Validate that versions for meteor-vite and the jorgenvatle:vite build plugin are compatible.

Patch Changes

jorgenvatle_vite@1.0.4

04 Dec 13:31
Compare
Choose a tag to compare

Patch Changes

  • 705a3d5: [Release] Rewrite package name after release to use consistent naming for releases on GitHub

jorgenvatle_vite@1.0.3

04 Dec 13:15
df183d4
Compare
Choose a tag to compare

Patch Changes

  • 37cd122: Use package.json instead of global variable for determining current version of jorgenvatle:vite

jorgenvatle_vite@1.0.2

04 Dec 08:50
d08da44
Compare
Choose a tag to compare

Patch Changes

  • c875e84: Add client entry module to runtime config
    • Bind package version to build plugin context

meteor-vite@3.0.1

02 Dec 07:37
cc5359d
Compare
Choose a tag to compare

Patch Changes

  • 2c15e6a: Fix issue where meteor-vite would not be loaded with apps not using the experimental serverEntry option for building the Meteor server with Vite.

    • Addresses the blank screen issue mentioned in #246

    Add server-side HMR handlers for meteor/ejson and SyncedCron.

meteor-vite@3.0.0

02 Dec 04:42
b7b583c
Compare
Choose a tag to compare

Major Changes

  • 9f65799: Upgrade to Vite v6

    ⚡ Added lightning fast server-side HMR through Vite's new Environments API

    • Vite can now take over the entire build process for the your Meteor server code. This is an improved iteration of the serverEntry option introduced in jorgenvatle:vite-bundler@2.1.0
      • It does not require any intermediary pre-bundling step and is done at runtime.
      • Changes you make to server code benefit from the same near-instant HMR that you get on the client.
      • Your Meteor server no longer needs to restart in-between changes you make changes to it.
    • Vite now runs as a part of the Meteor runtime.
      • HMR and assets are served through Meteor's own web server, dropping the need to manage more than one host in development. Should make things a lot easier to deal with if you need to expose the dev server to the local network, particularly for Cordova.
    • In production, the same changes from #173 apply. Your assets are built and served as static files without the need for pushing them through Meteor's build system.
    • Client assets benefit from code splitting. What's not immediately required on first page load will be prefetched quietly in the background by the browser.

    Server HMR

    Building the Meteor server with Vite is still in its experimental phase. To provide HMR for the server, modules with side-effects need to be cleaned up between changes. Currently we clear out your method and publication handlers between updates to prevent Mongo.Collection from yelling at you for defining/instantiating them twice. But there likely is a list of other things that might be other things that need to be cleaned up between reloads. Looking forward to any feedback on this.

    If you run into issues, you can always just comment out the serverEntry field in your Vite config and it should behave just like previous versions of Meteor Vite.

    Migration steps

    jorgenvatle:vite-bundler has been renamed to jorgenvatle:vite.

    # Upgrade Vite and Meteor-Vite
    meteor npm i vite@6
    meteor npm i meteor-vite@3
    
    # Upgrade Meteor build plugin
    meteor remove jorgenvatle:vite-bundler
    meteor add jorgenvatle:vite

    Breaking changes

    • Since Vite v5, support for Node.js v14 was dropped. Since this release depends on Vite v6, Meteor v2 support is no longer possible.

Minor Changes

  • f6a46b6: Disable Meteor package stubs when building for the server. This addresses some strange context issues with packages like redis-oplog when using stubs in intermediary server server bundle. The stubs are really only necessary in the server runtime environment, so this should be the safest way to build anyway.

Patch Changes

  • f31a820: Fix builds: disable incompatible Meteor build plugins on startup
  • 93bd49c: Fall back to importing from package root if subpath import fails. This is a temporary fix to address server compatability as the package parser currently only scans for exports in web.browser.
  • bd1e74a: Use global Package object as base for Meteor module stubs
  • 12398cb: Hotfix WebApp handler response call order and set an explicit content-type header for invalid Vite asset requests
  • 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.
  • d26c47e: Remove misplaced debug logger and expand information provided with unrecognized module method warnings.
    • Fix issue where Meteor package stubs would try to import directly from packages' full mainModule path (e.g. meteor/ostrio:cookies/main.js) rather than using the actually requested module path (e.g. meteor/ostrio:cookies). Resolves some issues where some package exports would show up as not found or undefined.
  • e80538d: Disable 'keepNames' feature from ESBuild - it appears to cause issues with downstream Meteor builds
  • 86c0474: Fix call order for production Vite asset 404 middleware

jorgenvatle_vite@1.0.1

02 Dec 04:56
8e047c0
Compare
Choose a tag to compare

Patch Changes

  • 930ca17: Hotfix for previous major release published using an out-of-date build plugin version

jorgenvatle_vite@1.0.0

02 Dec 04:42
b7b583c
Compare
Choose a tag to compare

Major Changes

  • 9f65799: Upgrade to Vite v6

    ⚡ Added lightning fast server-side HMR through Vite's new Environments API

    • Vite can now take over the entire build process for the your Meteor server code. This is an improved iteration of the serverEntry option introduced in jorgenvatle:vite-bundler@2.1.0
      • It does not require any intermediary pre-bundling step and is done at runtime.
      • Changes you make to server code benefit from the same near-instant HMR that you get on the client.
      • Your Meteor server no longer needs to restart in-between changes you make changes to it.
    • Vite now runs as a part of the Meteor runtime.
      • HMR and assets are served through Meteor's own web server, dropping the need to manage more than one host in development. Should make things a lot easier to deal with if you need to expose the dev server to the local network, particularly for Cordova.
    • In production, the same changes from #173 apply. Your assets are built and served as static files without the need for pushing them through Meteor's build system.
    • Client assets benefit from code splitting. What's not immediately required on first page load will be prefetched quietly in the background by the browser.

    Server HMR

    Building the Meteor server with Vite is still in its experimental phase. To provide HMR for the server, modules with side-effects need to be cleaned up between changes. Currently we clear out your method and publication handlers between updates to prevent Mongo.Collection from yelling at you for defining/instantiating them twice. But there likely is a list of other things that might be other things that need to be cleaned up between reloads. Looking forward to any feedback on this.

    If you run into issues, you can always just comment out the serverEntry field in your Vite config and it should behave just like previous versions of Meteor Vite.

    Migration steps

    jorgenvatle:vite-bundler has been renamed to jorgenvatle:vite.

    # Upgrade Vite and Meteor-Vite
    meteor npm i vite@6
    meteor npm i meteor-vite@3
    
    # Upgrade Meteor build plugin
    meteor remove jorgenvatle:vite-bundler
    meteor add jorgenvatle:vite

    Breaking changes

    • Since Vite v5, support for Node.js v14 was dropped. Since this release depends on Vite v6, Meteor v2 support is no longer possible.

Minor Changes

  • d45e887: Bump pre-release tag to avoid accidentally published v1 release from taking precedence

Patch Changes

  • f31a820: Fix builds: disable incompatible Meteor build plugins on startup
  • 60c8399: Wrap dev server bootstrapper around Meteor.startup hook. Workaround for issue where changes to Meteor.settings.public aren't sent to clients. Ref: meteor/meteor#13489
  • e80538d: Disable 'keepNames' feature from ESBuild - it appears to cause issues with downstream Meteor builds