如何使用加载程序导入本地打字稿软件包
我正在开发自己的打字稿软件包,可以在React项目中导入。
为了在开发时对其进行测试,我使用npm链接
链接了本地包,并使用create> create-react-app
cli创建了一个打字稿React项目。
导入我的软件包时,以下错误发生。
File was processed with these loaders:
* ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
我该如何修复?
I am developing my own typescript package which can be imported in react projects.
In order to test it while developing, I have linked the package locally using npm link
and created a typescript react project using create-react-app
cli.
When importing my package, following error happens.
File was processed with these loaders:
* ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
How can I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论