【发布时间】:2021-03-03 07:09:54
【问题描述】:
如果我尝试在下一个 Js 中使用 expo 组件,我会收到此错误
为了清楚,我正在使用带有下一个 js 的网络博览会,所以我希望两者共享相同的组件,据我所知这是可能的,但我收到了这个错误。
错误是:
Module parse failed: Unexpected character '' (1:0)
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
(Source code omitted for this binary file)
这是 next.config.js :
// Learn more: https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-nextjs.md#withexpo
const { withExpo } = require('@expo/next-adapter');
module.exports = withExpo({
projectRoot: __dirname,
});
这是 babel 配置:
// Learn more: https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-nextjs.md#shared-steps
module.exports = { presets: ['@expo/next-adapter/babel'] };
请帮助,希望信息足够
【问题讨论】:
-
我也得到了这个
标签: reactjs react-native expo next.js