webpack/test/cases/parsing/harmony-commonjs-mix/module1.js

20 lines
412 B
JavaScript
Raw Normal View History

import "./module";
(function() {
module.exports = 1;
}).should.throw();
(typeof module.exports).should.be.eql("undefined");
(typeof define).should.be.eql("undefined");
(function() {
define(function() {})
}).should.throw(/define is not defined/);
export default 1234;
2017-05-25 19:12:34 +08:00
if(eval("typeof exports !== \"undefined\"")) {
// exports is node.js exports and not webpacks
Object.keys(exports).should.be.eql([]);
}