英文:
es module loader for React.js?
问题
我正在尝试将 supabase/auth-ui
添加到我的 React 项目。
https://github.com/supabase/auth-ui
我的运行时错误是:
./node_modules/@supabase/auth-ui-react/dist/index.es.js 1095:48
模块解析失败:意外的令牌 (1095:48)
文件已使用以下加载器进行处理:
* ./node_modules/babel-loader/lib/index.js
您可能需要额外的加载器来处理这些加载器的结果。
我认为这意味着我无法处理 ES 模块。我需要一个 webpack 插件吗?
英文:
I am trying to add supabase/auth-ui
to my react project
https://github.com/supabase/auth-ui
My runtime error is:
./node_modules/@supabase/auth-ui-react/dist/index.es.js 1095:48
Module parse failed: Unexpected token (1095:48)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
I think this means that I cannot handle ES modules. Do I need a webpack plugin?
答案1
得分: 0
这些 tsconfig.json
中的数值解决了它:
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
">0.2%",
"not dead",
"not op_mini all"
]
}
英文:
These tsconfig.json
values fixed it:
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
">0.2%",
"not dead",
"not op_mini all"
]
},
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论