-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
'export default from' can not be correctly compiled #7293
Copy link
Copy link
Closed
Labels
Spec: export-default-fromclaimedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser
Description
Choose one: bug
Input Code
var from = 'test';
export default from;Babel/Babylon Configuration (.babelrc, package.json, cli command)
{
presets: [
[
'@babel/preset-env', {
targets: { browsers: ['android>=4', 'ios>=7'] },
modules: false,
},
],
],
plugins: [
'@babel/plugin-transform-runtime',
],
}Expected Behavior
Compiled correctly
Current Behavior
Throw an error
[!] (babel plugin) SyntaxError: /xxx/node_modules/@babel/runtime/core-js/array/from.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (6:8):
4 | var from = require$$0;
5 |
> 6 | export default from;
| ^
7 | export { from as __moduleExports };
Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.| software | version(s) |
|---|---|
| Babel | 7.0.0-beta.38 |
| Babylon | |
| node | 9.4 |
| npm | |
| Operating System | mac os |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Spec: export-default-fromclaimedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser