3.6.0
vue 2.6.0 @vue/cli-service 3.6.0
js文件中使用 require.context (webpack提供)浏览器 出现__webpack_require__(...).context is not a function (require.context is not function ) 同样 require.ensure 也不可用
require.context 可用
require.context 不可用
请遵守 Issue Helper 的说明,请提供可以运行的复现
这个问题已解决 require-context
传递给 require.context 的参数必须是字面量(literal)!
Seriously you are on an english-based community, you cannot speak in english, please? It may be useful for other devs reading you.
What @itlangzi tried to say there is that the path parameter has to be a literal regex and can't be passed via variable.
You can read more about this in another issue here: https://github.com/webpack/webpack/issues/9300#issuecomment-524744609
Most helpful comment
Seriously you are on an english-based community, you cannot speak in english, please? It may be useful for other devs reading you.