首页 > 编程知识 正文

vue使用插件的步骤,vue项目打包部署

时间:2023-05-03 17:47:42 阅读:159386 作者:2429

一、修改请求静态资源的路径

打开config下的index.js文件,将assetsPublicPath的值从“/”更改为“. /”。 将根路径更改为相对路径。

build : (/templateforindex.htmlindex : path.resolve ) __dirname,' ./dist/index.html ',/pathsasasable

打开build下的utils.js文件,添加publicpath:'./'

if(options.extract ) returnextracttextplugin.extract ) USE:loaders,fallback: 'vue-style-loader ',public

在vue.config.js上修正

//web文件夹公共path : '/web ' http://www.Sina.com /

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。