网页
综合
更新时间 2026-11-14 16:20:59
ProvidePlugin | webpack
自动蜘蛛
webpack.js.org
正文约 1366 字
Automatically load modules instead of having to import or require them everywhere.
By default, module resolution path is current folder (./**) and node_modules.
It is also possible to specify full path:
Whenever the identifier is encountered as free variable in a module, the module is loaded automatically and the identifier is filled with the exports of the loaded module (or property in order to support named exports).
For importing the default export of an ES2015 module, you have to specify the default property of module.
To automatically load jquery we can point both variables it exposes to the corresponding node module:
Then in any of our source code:
Angular looks for window.jQuery in order to determine whether jQuery is present, see the source code.
Copyright OpenJS Foundation and webpack contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | Bylaws | Code of Conduct | Trademark Policy | Trademark List | Cookie Policy
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。