1.3 tried to demystify Meteor magic putting everything into export declarations.
But, if we take for instance typical Node express app, it says:
var http = require('http"),
mongodb = require(“mongodb”);
At the same time, I see mongodb.js being used in the default Meteor 1.3 app but do not see it declared somewhere.
Where all the core/default packages declared?
UPD: I have finally found it looking at new example apps, so these are really no 'default magic
import { Mongo } from ‘meteor/mongo’;
export const Tasks = new Mongo.Collection(‘tasks’);
So as far as I understand that declaration goes to .meteor\packages\mongo\1.1.6\web.browser.json when building for web and parses:
{
“format”: “isopack-2-unibuild”,
“declaredExports”: [
{
“name”: “Mongo”,
“testOnly”: false
}
],
“uses”: [
{
“package”: “meteor”
},
… and further, resulting in mongodb.js and other files included?
There are “magic” import
s as you would say. It gets declared in http://localhost:3000/packages/global-imports.js
1 Like