wepack 配置externals ,项目启动报错bundle.js:2 Uncaught ReferenceError: axios is not defi-灵析社区

怎么说呢就这样吧

craco.config.js 中配置如下: webpackConfig.externals = { ``` axios: 'axios', }; ``` public/index.html 中引入 https://cdn.bootcdn.net/ajax/libs/axios/0.27.2/axios.js react项目启动报错: bundle.js:2 Uncaught ReferenceError: axios is not defined

阅读量:233

点赞量:0

问AI