Commit Graph

8 Commits

Author SHA1 Message Date
Ben Newman
6f75eae135 Remove automatic Buffer polyfill.
This polyfill is unnecessary in Node, and added a whopping 22KB to the
minified client bundle. If you really need the Buffer API on the client,
you can get it from require("buffer").Buffer.
2017-04-19 17:41:11 -04:00
Ben Newman
0bc4e2e804 Make sure Module.prototype.import === M.p.importSync for now.
The latest version of Reify generates module.importSync calls instead of
module.import calls, but we're not using module.import for anything else
(yet), so we might as well handle older generated code gracefully.

https://github.com/benjamn/reify/pull/85
https://github.com/benjamn/reify/issues/84
2017-03-27 12:34:34 -04:00
Ben Newman
218a4432b1 Support module.import(id, setters) and module.export(id, getters). 2016-05-19 17:04:09 -04:00
Ben Newman
b3a83bd118 Install reliable stubs for all Package[name] objects.
If a Meteor package had a file called index.js, the runtime module system
would resolve "meteor/<name>" to "/node_modules/meteor/<name>/index.js",
instead of falling back to Package[<name>] as expected.

Installing a stub for Package[<name>] at /node_modules/meteor/<name>.js
means the runtime module system no longer needs the fallback, and will no
longer be confused by index.js files.

Fixes #6590.
2016-04-07 13:05:52 -04:00
Ben Newman
2fa65685d6 Install stubs for Node built-in modules automatically.
The implementation of these stubs is controlled by an optional npm package
called meteor-node-stubs, so we can keep iterating on them after releasing
Meteor 1.3, if we need to.

Fixes #6056.
2016-02-27 18:41:23 -05:00
Ben Newman
3ff259f528 Export Buffer and process from modules instead of meteor-env-{dev,prod}. 2016-02-19 20:06:04 -05:00
Ben Newman
90541281ed Polyfill Buffer constructor for app node_modules. 2016-02-12 16:58:12 -05:00
Ben Newman
12c946ee65 Allow lazy CSS resources to be imported by JS. 2016-01-19 21:00:48 -05:00