-
-
Notifications
You must be signed in to change notification settings - Fork 782
Closed
Labels
bugSomething isn't workingSomething isn't workingpending triageThe issue/PR is currently untouched.The issue/PR is currently untouched.
Description
System Info
System:
OS: macOS 14.1.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 30.38 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
npmPackages:
@rspack/core: 0.4.5 => 0.4.5
Details
This bundled code by Rspack:
"./node_modules/apollo-server-core/dist/utils/createSHA.js": function (module, exports, __webpack_require__) {
module = __webpack_require__.nmd(module);
"use strict";
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
const isNodeLike_1 = __importDefault(__webpack_require__("./node_modules/apollo-server-core/dist/utils/isNodeLike.js"));
function default_1(kind) {
if (isNodeLike_1.default) return module.require('crypto').createHash(kind);
return __webpack_require__("./node_modules/sha.js/index.js")(kind);
}
exports["default"] = default_1;
},is throwing at runtime module.require is not a function in return module.require('crypto') line
This is the equivalent webpack bundled code that works fine:
"./node_modules/apollo-server-core/dist/utils/createSHA.js": (function (__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
const isNodeLike_1 = __importDefault(__webpack_require__("./node_modules/apollo-server-core/dist/utils/isNodeLike.js"));
function default_1(kind) {
if (isNodeLike_1.default) {
return __webpack_require__("crypto").createHash(kind);
}
return __webpack_require__("./node_modules/sha.js/index.js")(kind);
}
exports["default"] = default_1;
}),Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpending triageThe issue/PR is currently untouched.The issue/PR is currently untouched.