admin管理员组

文章数量:1335380

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.

本文标签: