webpack 5.103.0 generates var __webpack_exports__ = {}; in both production and development mode.
In addition in --mode development it includes
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
__webpack_exports__ does not get any other value, it is all the time {}.
I have in webpack.config.js:
optimization: {
minimize: false,
concatenateModules: true
},
experiments: {
outputModule: true
},
performance: {
maxAssetSize: 300000,
maxEntrypointSize: 300000
},
output: {
library: {
type: 'module'
},
filename: 'tui-calendar.js',
publicPath: '/dist'
},
- When the only usage of
__webpack_exports__ is var __webpack_exports__ = {};, then var __webpack_exports__ = {}; should not be emmited.
webpack 5.103.0 generates
var __webpack_exports__ = {};in both production and development mode.In addition in
--mode developmentit includes__webpack_exports__does not get any other value, it is all the time{}.I have in
webpack.config.js:__webpack_exports__isvar __webpack_exports__ = {};, thenvar __webpack_exports__ = {};should not be emmited.