-
Notifications
You must be signed in to change notification settings - Fork 10
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
⚡ Refreshing configuration from Vite dev server... #247
Comments
In
|
A potential fix that sometimes works for me is to remove your package-lock.json and node_modules folder and do a If this doesn't fix the issue, it might have something to-do with your vite.config.ts file (could you share your current config?). And if possible, could you make a small project to replicate this issue, so others can look into your project? Let me know if you need any further help! |
Thanks.
It did not work. I find a way to reproduce it: Running
Upgrade
I do not know if the problem is the |
I suspect Meteor and Vite are unable to establish an IPC channel. Could you try with |
I think that could be from leftovers from the previous Meteor-Vite installation. Try to delete your Also just shipped a new major release for Vite v6. it removes a lot of the work needed to get Meteor to work with Vite. It should address the IPC issues and the browser error you're seeing. meteor remove jorgenvatle:vite-bundler
meteor add jorgenvatle:vite
meteor npm i meteor-vite@3 vite@6 |
Thanks. It works. An old
I tried this configuration. For development, it is OK. But I try to build, I have the following error:
I managed to build by adding an
|
Having similar issue here.... Adding the stubValidation entry to vite.config.mjs above enables the build to complete, but causes a problem in dev:
Any suggestions? |
@hluz Oh, might be an issue with the new build process. Which version of |
Oh, thanks for the heads up @harry-73 🙌 I'll get a fix out shortly. |
Oh, make sure you configure Meteor-Vite through the Vite plugin, not the deprecated "meteor" property. Previous versions needed to have configuration overrides and defaults injected into your Vite config based on what Meteor is doing. Now it's just determined through the plugin based on the current environment. Which is more how true to how most Vite plugins are configured. Plus you should get type hints this way. The old configuration method was deprecated a while ago but I may have forgotten to make a good note about this with recent releases. 😅 Meteor may also still be shipping skeleton apps with the old format. // vite.config.ts
import { defineConfig } from 'vite'
+ import { meteor } from 'meteor-vite/plugin';
export default defineConfig({
plugins: [
+ meteor({
+ clientEntry: imports/ui/main.js',
+ stubValidation: {
+ warnOnly: true
+ },
+ }),
],
- meteor: {
- clientEntry: 'imports/ui/main.js',
- // serverEntry: 'server/entry-vite.js',
- // enableExperimentalFeatures: false, // Required to enable server bundling.
- stubValidation: {
- warnOnly: true
- // ignorePackages: ['meteor/alanning:roles', 'meteor/mongo']
- },
- meteorStubs: {
- meteor: {
- buildProgramsPath: ''
- }
- }
- },
}) |
Ah! thanks! That was it. I hadn't noticed that change... :-( BTW, since I have you here, do you know what are the plans for Vue 3 Tracker integration, considering that vue-meteor-tracker looks like abandonware? Noticed that some of the examples are using a "non-packaged" integration (v-meteor), which I tried but it has the same issues than vue-meteor-tracker@3.0.0-beta.7, namely, that it does not work consistently with Vue3 Options API at least. Would be great if Meteor gave that some attention. |
Oh, I believe what you see in I'm not aware of any plans for the In my own projects I have a tracker implementation similar to what's available in the Vue+SSR example app (see VueMeteor.ts) this is composition-only though. If there is a real need and time allows for it, we could probably package it up and add a compatibility layer for the Though, optimally there should be some initiative from the Meteor team to maintain an official tracker package for Vue similar to what they have for React. |
! Thanks. It works. Sorry, I did not see the modification. |
I agree, there should be. I'll raise it in the Meteor Forums. Having said that, I found a way to have vue-meteor-tracker@3.0.0-beta.7 to work with the Vue 3 Options API... For anyone interested, you need to:
Empty meteor option is important. Then use this$subscribe inside autorun in mount capturing subReady in a data variable ($subReady does not get generated) . Something like:
That is the only way that I could get it to work with full reactivity between Vue <-> Meteor worlds... Anyway, many thanks for all you are doing with meteor-vite and for the great response! |
Believe the original issue was addressed with a later update to meteor-vite v2.0. I'll close this for now, feel free to re-open if it re-appears. 👍 Meteor-Vite v3.0+ won't be impacted by the issue now that Vite and Meteor run under the same process. |
hi,
Meteor@3.0.3
I use, without any issues,
meteor-vite@1.10.4
vite-bundler@2.0.4
withvite@4
.I am trying to upgrade, without success, to
meteor-vite@1.12.0
vite-bundler@2.2.0
withvite@5
.I have the following messages:
The text was updated successfully, but these errors were encountered: