In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article Xiaobian for you to introduce in detail "vue how to generate file local open view effect", the content is detailed, the steps are clear, the details are handled properly, I hope this "vue how to generate file local open view effect" article can help you solve your doubts, the following follows the editor's train of thought slowly in depth, together to learn new knowledge.
Problem description:
After npm run build, the path for the direct browser to open index.html,css and js under the dist folder is incorrect. It's normal to put it in the directory.
Problem solving:
Open the config-index.js in the folder of the project
Just add a dot to the assetsPublicPath in the build section
AssetsPublicPath:'/
Change to
AssetsPublicPath:. /'
Explanation:
Change the absolute path to the relative path (the explanation is a little wrong, make do with it)
Extend:
The effect of this mainly affects the build- webpack.base.conf.js in the folder where the project is located.
The effect is equivalent to:
Output: {path: config.build.assetsRoot, filename:'[name] .js', publicPath: process.env.NODE_ENV = = 'production'? Config.build.assetsPublicPath: config.dev.assetsPublicPath}
Changed to:
Output: {path: config.build.assetsRoot, filename:'[name] .js', publicPath: process.env.NODE_ENV = 'production'?'. /': config.dev.assetsPublicPath}, this is the end of the article "how to generate files for local opening and viewing effect" article. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, Welcome to 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.