首页 > 其他分享 >create-react-app 设置build构建的上下文 publicPath

create-react-app 设置build构建的上下文 publicPath

时间:2022-10-09 17:03:07浏览次数:65  
标签:app testing library react version build scripts create


在​​package.json​​中添加

"homepage": "."

完整的

{
"name": "portal",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"sass": "^1.54.1",
"sass-loader": "^13.0.2"
},
"homepage": "."
}


标签:app,testing,library,react,version,build,scripts,create
From: https://blog.51cto.com/u_12836588/5740767

相关文章