In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you about the vue framework development page white screen how to do, I believe that most people do not understand, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
What's wrong with the blank screen of the web page?
1.npmrunbuild Packaging Page is blank
We will find that there is a path error in the js and css files referenced in the page head, which is modified as follows:
Solution location: config/index.js file: change assetsPublicPath:'/' to assetsPublicPath:'./'
Build: {
AssetsPublicPath:'./'
}
Unable to open web page under Safari of 2.iOS
The version of webpack-dev-server > = 2.8.0 cannot open the web page under iOSSafari, and the effect is white screen.
Console error: Can'tfindvariable:SockJS should be the BUG of Safari. For example, the following code will throw
Erroreval ("consta=function () {}; functionb () {a ();}; b ();")
The solution to the blank screen of web pages
1. Use the old version:
two。 Other methods
Yarnaddbabel-plugin-transform-es2015-block-scoping-D
Modify webpack related configuration
{
Test:/\ .js $/
Loader:'babel-loader'
Include: [
...
/ node_modules\ / webpack-dev-server/
]
}
3. Upgrade vue2+ part of the mobile phone access page blank
Messages that cannot be loaded into the routing template may appear after npmrundev.
Solution location: config/index.js file: change devtool:'#eval-source-map' to devtool:'inline-source-map'
Dev: {
Devtool:'inline-source-map'
}
4. Upgrade vue2+IP access page blank
By default, it can only be accessed through localhost or 127.0.0.1, and it will be inaccessible if you use the native Ip address.
Solution location: config/index.js file: configure "host" in config/index.js to "0.0.0.0", or set it to the IP address of your computer:
Dev: {
Host:'192.168.10.122'
The above is all the contents of the article "what to do when the page goes white in vue framework development?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.