sebmarkbage / link.js

Link.js is a module loader and conversion tool. It supports Labeled Modules, CommonJS and Asynchronous Module Definitions (AMD).
Other
29 stars 9 forks source link

Include error report about re-exporting a variable in Web version #1

Open GCheung55 opened 12 years ago

GCheung55 commented 12 years ago

Re-exporting vars like the following does not work:


require: 'A';

exports A, B

var B = function(){};

But this works:


exports A, B

var A = require('A').A;

var B = function(){};

The cli, I've been told, would have reported an error explaining this.

sebmarkbage commented 12 years ago

Note to self: Also add a warning if "require:" is used to import a module that has non-lexical exports.