Last active
July 14, 2018 13:32
-
-
Save insin/078533bae2d2e91ec94e90ff91e95593 to your computer and use it in GitHub Desktop.
babel-plugin-add-module-exports bug repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ | |
"@babel/env", | |
], | |
"plugins": [ | |
"add-module-exports" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ | |
["@babel/env", {loose: true}] | |
], | |
"plugins": [ | |
"add-module-exports" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Test { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = void 0; | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var Test = function Test() { | |
_classCallCheck(this, Test); | |
}; | |
exports.default = Test; | |
module.exports = exports.default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
exports.__esModule = true; | |
exports.default = void 0; | |
var Test = function Test() {}; | |
exports.default = Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"build": "babel index.js --config-file ./.babelrc-default -o out-default.js && babel index.js --config-file ./.babelrc-loose -o out-loose.js" | |
}, | |
"dependencies": { | |
"@babel/cli": "7.0.0-beta.53", | |
"@babel/core": "7.0.0-beta.53", | |
"@babel/preset-env": "7.0.0-beta.53", | |
"babel-plugin-add-module-exports": "0.3.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment