robertknight / webpack-bundle-size-analyzer

A tool for finding out what contributes to the size of Webpack bundles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.4.1 has a different folder structure than previous releases

snyamathi opened this issue · comments

I'm not quite sure what the structure should be, but previous releases had both src folder inside the build folder in addition to the files in the build folder. Can you clarify the expected structure?

Depending on the answer to the above - should the src and tests folders be added to a .npmignore?

$ tree 2.4.1/
2.4.1/
├── CHANGELOG.md
├── README.md
├── build
│   ├── src
│   │   ├── cli.js
│   │   ├── size_tree.js
│   │   └── webpack_stats.js
│   └── tests
│       └── size_tree_test.js
├── package.json
└── webpack-bundle-size-analyzer

3 directories, 8 files

$ tree 2.4.0/
2.4.0/
├── CHANGELOG.md
├── README.md
├── build
│   ├── cli.js
│   ├── size_tree.js
│   ├── src
│   │   ├── cli.js
│   │   ├── size_tree.js
│   │   └── webpack_stats.js
│   ├── tests
│   │   └── size_tree_test.js
│   └── webpack_stats.js
├── package.json
└── webpack-bundle-size-analyzer

3 directories, 11 files

$ tree 2.3.0/
2.3.0/
├── CHANGELOG.md
├── README.md
├── build
│   ├── cli.js
│   ├── size_tree.js
│   ├── src
│   │   ├── cli.js
│   │   ├── size_tree.js
│   │   └── webpack_stats.js
│   ├── tests
│   │   └── size_tree_test.js
│   └── webpack_stats.js
├── package.json
└── webpack-bundle-size-analyzer

3 directories, 11 files

Thanks for the report. Out of interest, how did you come to notice the change?

We were requiring webpack-bundle-size-analyzer/build/size_tree by its path

The current directory structure (in v2.4.1) is what I would expect. You're right that the tests/ directory should not have been included.

I have pushed v2.4.2 which removes these unnecessary files.

If you can explain a bit more about what you are doing with the size_tree module I could consider publishing it as an actual supported public API rather than requiring poking around inside the module internals.