reactjs - Webpack + react + firebase 身份验证失败
问题描述
我正在尝试在firebase上进行身份验证。我从关于“react-create-app”的教程中完成了所有工作,并且它有效,但是当我使用 webpack 在项目中制作它时它不起作用。当我尝试登录或注册时,电子邮件和密码只是添加到网址中。在“react-create-app”上它做 POST 请求。我认为我必须配置 webpack。你有什么主意吗?
webpack.config:
const HtmlWebPackPlugin = require("html-webpack-plugin");
const path = require('path');
module.exports = {
entry: "./src/App.js",
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ["babel-loader", "eslint-loader"]
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: ['style-loader', 'css-loader', 'sass-loader'],
}
]
},
devServer: {
historyApiFallback: true
},
plugins: [new HtmlWebPackPlugin({template: "./src/index.html"})]
};
解决方案
推荐阅读
- java - 更改 VFS 中的缓冲区大小
- sql - Oracle 设置架构密码永不过期
- sql - 时间尺度上的计算字段
- rabbitmq - 如何在 Rabbitmq 中重命名队列?
- pandas - PD.Read_Excel 将列作为索引读取?
- python - 使用特定程序打开文件不会产生输出
- rust - 使用 rust 读取 .dfb 文件会引发无效字符错误
- javascript - Foreach 选择定义文本区域值
- google-cloud-storage - 名称包含“%”的 Google Cloud Storage 列表对象返回 403 错误
- python - 如何将数据框 python 的列可视化为绘图?