webpack/webpack

export in library works only for last entry module

開放

#15,936 建立於 2022年6月9日

 (11 則留言) (1 個反應) (0 位負責人)JavaScript (9,356 個分叉)batch import
help wantedwebpack-5

倉庫指標

星標
 (65,766 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Bug report

export in library works only for last entry module

What is the current behavior?

in webpack config like:

module.exports = {
  entry: ["a", "b", "c"],
  output: {
    library: { type: "global" }
  }
};

only exports from c will be used

If the current behavior is a bug, please provide the steps to reproduce.

https://github.com/TGRHavoc/webpack-mvp

What is the expected behavior? should use all exports

Other relevant information: webpack version: latest Node.js version: Operating System: Additional tools:

貢獻者指南