Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Windows 10 和 macOS 10.14.3 上使用最新的 Node.js LTS 10。当我使用requirelike导入库时,导入库const require = require('rollup');大约需要 10 分钟或更长时间。async在我的代码中添加一些函数后,我开始注意到这个问题。import在mjs文件中使用 ES在ts-node包和模块解析方面存在问题,也许还有其他建议?
require
const require = require('rollup');
async
import
mjs
ts-node
ignore: []在我的选项中有一个ts-node,这导致处理所有node_modules. 使用正则表达式缩小包的范围ignore: ['/node_modules\/(?!package-name).*/']解决了这个问题。
ignore: []
node_modules
ignore: ['/node_modules\/(?!package-name).*/']