developit / developit/microbundle
async/await is always transpiled into regenerator even with browserconfig or babelrc
- Dominant language
- JavaScript
- Stars
- 8.1k
- Forks
- 358
- PR merge metrics
- No merged PRs in 30d
Description
**[Click to see workaround](https://github.com/developit/microbundle/issues/705#issuecomment-675901881)**
### How to reproduce error
Execute this script in an empty directory
```bash
#!/bin/bash
cat > index.js <<< 'export function* yo() { yield 1 }'
cat > package.json <<'EOF'
{
"name": "a",
"devDependencies": {
"microbundle": "0.12.3"
},
"browserslist": [
"last 2 Chrome versions"
]
}
EOF
yarn
yarn microbundle --no-compress
cat dist/a.js
```
### Expected resut
```js
function* yo() {
yield 1;
}
exports.yo = yo;
//# sourceMappingURL=a.js.map
```
### Actual result
```js
var _marked = /*#__PURE__*/regeneratorRuntime.mark(yo);
function yo() {
return regeneratorRuntime.wrap(function yo$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return 1;
case 2:
case "end":
return _context.stop();
}
}, _marked);
}
exports.yo = yo;
//# sourceMappingURL=a.js.map
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.