使用 pdf.js 没有 node_module 依赖项的网络查看器

use pdf.js web viewer without node_module dependencies

我使用 gulp generic 命令克隆并构建了 pdf.js。我打算使用位于 /web/viewer.html 中的查看器,但脚本需要 node_modules 依赖项。

有没有办法构建 pdf.js 以在没有 node_module 依赖项的情况下使用此查看器?我在 SVN 环境中工作,但无法将 node_modules 文件夹添加到版本控制

不要将 web/viewer.html 用于生产。由于您已经 运行 gulp generic -- 在 build/generic/web/viewer.html 中使用查看器并且它在 node_modules 中没有依赖项。 ... 或者您可以从 http://mozilla.github.io/pdf.js/getting_started/#download

下载此部分