最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to ignore "Seems to be a pre-built javascript file...Try to require the original source to get better results.&

programmeradmin7浏览0评论

Webpack is throwing a warning: "This seems to be a pre-built javascript file. Though this is possible, it's not remended. Try to require the original source to get better results."

However, this library I am including is intentionally pre-built such that consuming applications do not need to replicate its build steps and configuration.

How do I ignore this warning?

Webpack is throwing a warning: "This seems to be a pre-built javascript file. Though this is possible, it's not remended. Try to require the original source to get better results."

However, this library I am including is intentionally pre-built such that consuming applications do not need to replicate its build steps and configuration.

How do I ignore this warning?

Share Improve this question asked Sep 29, 2016 at 10:42 ngokevinngokevin 13.2k5 gold badges44 silver badges87 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

Fix this by adding the path to the prebuilt module into your webpack config under module:

module: {
    // ...
    noParse: [
      '/node_modules/prebuiltlib/dist/build.js',
    ]
    // ...
}

This has the added benefit of slightly faster build times.

I just copy and paste the same node_module from another solution into my repo, it's works for me i got error for jspdf.js library of node module. this is due to the different versions and code i guess.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论