-
-
Notifications
You must be signed in to change notification settings - Fork 384
[Optimization request] Remove empty "modules" #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please provide minimum reproducible test repo, it should be removed by webpack |
I've somehow missed your reply. Gonna try to prepare slimmed down repro for this. |
@evilebottnawi minimum reproducible test repo: https://github.com/irudoy/webpack-mceplugin-empty-repro |
@evilebottnawi any thoughts? |
@irudoy sorry, some busy, but you can send a PR with implementation this feature 👍 |
@evilebottnawi I experimented a bit, but with no luck. Can you point out how to achieve this? |
@irudoy we solved this problem for extract-text-webpack-plugin (https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/webpack-1/index.js#L280), i think solution is same |
Some results:
|
Great 👍 |
I found that the problem still exists when using |
When using this plugin we might end up with something like this:
Click
/***/ 54: /***/ (function(module, exports, __webpack_require__) {// extracted by mini-css-extract-plugin
/***/ }),
// 92:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 93:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 94:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 95:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 96:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 97:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
// 98:
// (function(module, exports, webpack_require) {
// extracted by mini-css-extract-plugin
/***/ }),
Seems like this could be optimized away - i know that probably minifier + gzip makes this kinda cheap, but parsing costs add up and it would be always good to strive for less code in such cases.
The text was updated successfully, but these errors were encountered: