什么是\`require.context\`

网络包 Webpack

神奇MandyPro

2020-03-24

Webpack文件

You can create your own context with the require.context() function.
大。什么是“上下文”?这实际上是做什么的?

It allows you to pass in a directory to search, a flag indicating whether subdirectories should be searched too, and a regular expression to match files against.
允许我“搜索”吗?搜索我假设的文件,然后呢?此功能最终会做什么?这有什么用途?

第3637篇《什么是\`require.context\`》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点

0个回答

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android