os: macOS 14.6.1
mongodb: mongodb-community 6.0.16
meteor: 3.0.2
nodejs: 20.15.1
1.create the first app with meteor create vue1 --vue --release 3.0.2
2.run the first app with MONGO_URL=mongodb://127.0.0.1:27017/app meteor --port 3000
3.the browser will display vue1 app with http://localhost:3000
4.create the second app with meteor create vue2 --vue --release 3.0.2
5.run the first app with MONGO_URL=mongodb://127.0.0.1:27017/app meteor --port 4000
6.the browser will display vue2 app with http://localhost:4000
7.now I refresh http://localhost:3000
, it will display vue2 app
reason:
jorgenvatle:vite-bundler
package’s loading/vite-connection-handler.ts
has create a collection in line 126. the two apps will share MeteorViteConfig
, because set env with MONGO_URL=mongodb://127.0.0.1:27017/app
if (Meteor.isDevelopment) {
MeteorViteConfig = new Mongo.Collection(ViteConnection.publication);
}