I am trying to compile a file with the following content:
export default class Foo {}
The output of the compilation is:
"use strict";
define(["@babel/runtime/helpers/classCallCheck"], function (_classCallCheck) {
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
export { Foo as default };
});
My babel configuration is:
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"debug": false,
"corejs": 3,
"targets": {
"ie": "11",
"edge": "40",
"safari": "10",
"firefox": "58",
"chrome": "64"
}
}
]
],
"plugins": [
"@babel/plugin-transform-runtime",
"babel-plugin-transform-es2015-modules-simple-amd"
],
"sourceType": "module",
"minified": false
}
And the versions of all of these, as declared in package.json
are:
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.0",
"babel-plugin-transform-es2015-modules-simple-amd": "^0.3.0",
"core-js": "^3.2.1",
Do you know what might be causing this?