问题描述
有很多信息,但大多数信息可能无用,而错误可能是基本的。
我已经使用以下命令运行了webpack:
module.exports = {
entry: {
"app": "./src/client/index.js",},module: {
rules: [
{
test: /\.css$/,use: ["style-loader","css-loader"],exclude: /node_modules/,{
test: /\.js$/,loader: "babel-loader",}
],output: {
path: __dirname+"/functions/public",filename: "bundle.js",}
按照此处的教程进行操作: https://medium.com/swlh/moving-your-website-to-server-side-rendering-ssr-in-reactjs-36278d4a87f5
.babelrc
{
"presets":[
"@babel/preset-react","@babel/preset-env","@babel/preset-flow"
]
}
我曾尝试将css代码手动放置到functions / src文件夹中,但是重复同样的错误。
脚本:
"theThing": "node_modules/.bin/babel ./src/server -d functions/ && babel ./src/client -d functions/src","webpack":"node_modules/.bin/webpack-cli --config webpack.config.js"},
感谢您抽出宝贵的时间对此进行研究。
命令使用了错误:
node functions/index.js
对教程声明的评论:
Good job! But I think you should look at your example. It doesn't access any file such "manifest.json" or favicon.ico.
在删除所有css并重新编译服务器时,由于不久之后“无法解码清单”而导致服务器加载,但会产生错误。
有什么解决方法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)