`target: node` outputs a weird module

The resulting main.js looks like this.
module.exports is an array [1,0].
But in my code I have module.exports = function() { ... }.
Why is it an array?

module.exports =
exports.ids = [1,0];
exports.modules = [
/* 0 */
/*!*************************************!*\
  !*** ./code/page-server/webpack.js ***!
  \*************************************/
/***/ function(module, exports, __webpack_require__) {

    // use bluebird for Promises
    'use strict';

    __webpack_require__(/*! babel-runtime/core-js/promise */ 5)['default'] = __webpack_require__(/*! bluebird */ 18);

    if ((undefined)) {
        __webpack_require__(/*! bluebird */ 18).longStackTraces();
    }

    console.log('$$$$$$$$$$$$', __webpack_require__(/*! ./webpage rendering */ 14));

    module.exports = __webpack_require__(/*! ./webpage rendering */ 14);

/***/ },
/* 1 */
...

Author: Fantashit

1 thought on “`target: node` outputs a weird module

Comments are closed.