type: 'module' or format: 'esm' should generate esm modules
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Right now the resulting `dist/index.min.js` does not provide named exports because the format is not set to esm. This happens because of padded `umd` banner and footer. The output should be esm which can then be imported for both the browser and node.
This can be achieved right now by setting `package.json` like so:
```js
...
"type": "module",
...
"aegir": {
"build": {
"config": {
"format": "esm",
"banner": {
"js": ""
},
"footer": {
"js": ""
}
}
}
},
...
```
This should be selected by default if:
1. `package.json` type is set to `module`
2. `build.config.format` is `esm`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.