mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Keep using module.useNode() instead of bundling server node_modules.
This partially reverts commit 4dfc74197a.
Some server packages, especially those that rely on __dirname or
__filename (e.g. puppeteer), simply cannot be included in the server
bundle, and must be evaluated natively by Node.
As long as we have a Module.prototype._compile hook to process natively
evaluated modules with Reify, module.useNode() can still benefit from ESM
import/export syntax.
This commit is contained in:
@@ -1222,17 +1222,6 @@ export default class ImportScanner {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
absModuleId.endsWith(".js") ||
|
||||
absModuleId.endsWith(".mjs")
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (absModuleId.endsWith(".node")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const parts = absModuleId.split("/");
|
||||
let start = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user