link.js icon indicating copy to clipboard operation
link.js copied to clipboard

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

Open GCheung55 opened this issue 13 years ago • 1 comments

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.

GCheung55 avatar Feb 24 '12 01:02 GCheung55

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

sebmarkbage avatar Feb 29 '12 21:02 sebmarkbage