One problem: assetsPublicPath Configuration Error
Solution: Open config / index.js File
Build: {
// assetsPublicPath: '/'
assetsPublicPath: './'
}
Second problem: Route history mode misconfigured
router / index.js
solution: Close route historym mode
Export new new default Router ({
// mODE: 'History', // the require-Service Support
scrollBehavior: () => ({
Y: 0
}),
routes: constantRouterMap
})
performed after build npm run blank page is displayed
read the number 2858
recently learning to use webpack, final packaging process in the project, obtained after execution npmrunbuild dist directory onto the server opens, displaying a blank page, but the title display properly, view the console is found position data request error, access to information after know ... Bowen
from: YooHoeh's blog
on reactjs use npm run build in a windows environment later, open the page appears blank solution
After npm run build packaged blank pages to solve the problem in both cases
Guess you like
Origin www.cnblogs.com/asplover/p/11521040.html
Recommended
Ranking