React脚手架打包后运行页面空白解决方法:
方法一:在package.json文件中进行如下修改
{
"name": "cnode",
"version": "1.0.0",
"description": "",
"main": "index.js",
"homepage":"./",
"author": "",
"license": "ISC",
}
方法二:在webpack.config.js文件中进行如下修改
module.exports = {
···
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].[hash].js',
publicPath: "./"
}
···
}