Using `--why --save-bundle <DIR>` with multiple sections is buggy
- 主要語言
- JavaScript
- 星號
- 6.9k
- 分支
- 1.8k
- 平均合併
- 44 分鐘
- 30 天內合併 PR
- 1
描述
I tried using `size-limit --why --clean-dir --save-bundle ./test` with a config file that looks like this:
```
const defaultConfig = {
path: './src/main-modules.ts',
brotli: false,
};
module.exports = [
{
name: 'Full package',
import: '*',
limit: '200 kB',
...defaultConfig,
},
{
name: 'Testing EventEmitter',
import: '{ EventEmitter }',
limit: '20 kB',
...defaultConfig,
},
{
name: 'Testing Pool',
import: '{ Pool }',
limit: '20 kB',
...defaultConfig,
},
];
```
While multiple `.html` report files are generated with different names, as the sections, the `.js` files generated are always with the same name. This results in only the last section actually being tested (I assume they override each other) and all the reports are taintent and identical. (based on the last section)
I didn't look into the library's code yet but I assume the solution should be to also generate multiple `index.js` files based on the section name.
P.S. It'd also be nice to be able to cancel minification from the config options. This helps a lot when trying to debug why tree-shaking is failing.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。