mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
18 lines
506 B
JavaScript
18 lines
506 B
JavaScript
// On the client, make package resolution prefer the "browser" field of
|
|
// package.json files to the "main" field.
|
|
makeInstallerOptions.browser = true;
|
|
|
|
makeInstallerOptions.fallback = function (id, parentId, error) {
|
|
if (id && id.startsWith('meteor/')) {
|
|
var packageName = id.split('/', 2)[1];
|
|
throw new Error(
|
|
'Cannot find package "' + packageName + '". ' +
|
|
'Try "meteor add ' + packageName + '".'
|
|
);
|
|
}
|
|
|
|
throw error;
|
|
};
|
|
|
|
meteorInstall = makeInstaller(makeInstallerOptions);
|