[Bug]: No export when export function with eval usage #476
Open
Description
Before
Source
export function add(a: number, b: number) {
return a + b;
}
Output
function add(a, b) {
return a + b;
}
export { add };
Current
If we use eval
in a function
Source
export function add(a: number, b: number) {
return a + b;
}
export function evalFunc() {
return eval('1');
}
Output
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/define_property_getters
(()=>{
__webpack_require__.d = function(exports, definition) {
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
enumerable: true,
get: definition[key]
});
};
})();
// webpack/runtime/has_own_property
(()=>{
__webpack_require__.o = function(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
};
})();
// webpack/runtime/make_namespace_object
(()=>{
// define __esModule on exports
__webpack_require__.r = function(exports) {
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
});
Object.defineProperty(exports, '__esModule', {
value: true
});
};
})();
/************************************************************************/ var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
add: function() {
return add;
},
evalFunc: function() {
return evalFunc;
}
});
function add(a, b) {
return a + b;
}
function evalFunc() {
return eval('1');
}