reactjs - 如何使用 expo 运行 react-styleguidist “您可能需要适当的加载程序来处理此文件类型。”
问题描述
我想将 react-styleguidist 与 expo 一起用于 react-native 组件的 Web 开发。
到目前为止,我在运行时有以下内容npm run styleguide
:
./node_modules/react-native-safe-area-view/index.js 124:28
Module parse failed: Unexpected token (124:28)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| class SafeView extends Component {
> static setStatusBarHeight = height => {
| _customStatusBarHeight = height;
| };
@ ./node_modules/@react-navigation/native/dist/index.js 25:11-49
@ ./node_modules/react-navigation/src/react-navigation.js
@ ./src/core/AppCore.js
@ ./node_modules/react-styleguidist/lib/loaders/styleguide-loader.js!./node_modules/react-styleguidist/lib/client/index.js
@ ./node_modules/react-styleguidist/lib/client/index.js
@ multi ./styleguide/setup.js ./node_modules/react-styleguidist/lib/client/index ./node_modules/react-dev-utils/webpackHotDevClient.js
我使用 expo 并且从来不需要在 expo 项目中自己配置 webpack。为了在 expo 中运行 react styleguidist,我还需要在默认的 react-styleguidist webpack 配置中添加什么?
解决方案
推荐阅读
- c# - C#权限检查器属性?
- javascript - Javascript 解析大字符串
- javascript - 找出持有 null 的列的类型
- redis - Redis 键随机消失
- java - 将 base64 字符串解码为位图失败
- react-table - 使用 react-table 对同一行中的不同数据对象进行排序
- cassandra - 如何在 docker 容器中创建 cassandra 键空间?
- spring-boot - Spring Boot Actuator 是否有 Java API?
- sql-server - 提供在 2008 年 7 月 1 日之后订购产品 711 和 712 的客户 ID 和帐号的唯一列表
- java - 使用 Eclipse 使用 Java 查找素数