Skip to content

Commit

Permalink
Add assumptions field to Babel config to tweak the CommonJS conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Sep 4, 2021
1 parent 8fbf2ed commit 0b55cce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"extMapping": { ".mjs": ".js" }
}]
],
"assumptions": {
"constantReexports": true,
"noIncompleteNsImportDetection": true
},
"env": {
"test": {
"sourceMaps": "inline"
Expand Down
35 changes: 5 additions & 30 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,8 @@ const { setFloat16, getFloat16 } = require("./lib/DataView.js");
const { Float16Array, isFloat16Array } = require("./lib/Float16Array.js");
const { hfround } = require("./lib/hfround.js");

Object.defineProperty(exports, "hfround", {
enumerable: true,
get: function () {
return hfround;
},
});
Object.defineProperty(exports, "Float16Array", {
enumerable: true,
get: function () {
return Float16Array;
},
});
Object.defineProperty(exports, "isFloat16Array", {
enumerable: true,
get: function () {
return isFloat16Array;
},
});
Object.defineProperty(exports, "getFloat16", {
enumerable: true,
get: function () {
return getFloat16;
},
});
Object.defineProperty(exports, "setFloat16", {
enumerable: true,
get: function () {
return setFloat16;
},
});
exports.setFloat16 = setFloat16;
exports.getFloat16 = getFloat16;
exports.Float16Array = Float16Array;
exports.isFloat16Array = isFloat16Array;
exports.hfround = hfround;

0 comments on commit 0b55cce

Please sign in to comment.