dist打包到springboot
springboot 项目结构:
方案二 :
不修改配置
1。把dist文件夹复制到 spring项目的 resource 文件夹里
2。 重命名 dist 文件夹 为 static
如果项目的static已经有别的东西 ,这个复制的时候要小心
方案1 修改dist 的打包位置 :
修改 config/index.js 的build
module.exports = {dev: {...........},build: {.........}
}
修改这两个
index: path.resolve(__dirname, ‘…/dist/index.html’),
assetsRoot: path.resolve(__dirname,’…/dist/’),
使用git的时候 ,注意
build -》 的webpack 配置文件会自动修改对应的打包位置
build: {// Template for index.html// index: path.resolve(__dirname, '../dist/index.html'),// assetsRoot: path.resolve(__dirname,'../dist/'),index: path.resolve(__dirname, '../../resources/static/index.html'),assetsRoot: path.resolve(__dirname,'../../resources/static/'),assetsSubDirectory: 'static',assetsPublicPath: '/',/*** Source Maps*/productionSourceMap: true,// https://webpack.js.org/configuration/devtool/#productiondevtool: '#source-map',// Gzip off by default as many popular static hosts such as// Surge or Netlify already gzip all static assets for you.// Before setting to `true`, make sure to:// npm install --save-dev compression-webpack-pluginproductionGzip: false,productionGzipExtensions: ['js', 'css'],// Run the build command with an extra argument to// View the bundle analyzer report after build finishes:// `npm run build --report`// Set to `true` or `false` to always turn it on or offbundleAnalyzerReport: process.env.npm_config_report}
dist打包到springboot相关推荐
- jenkins shell 权限_使用Jenkins一键打包部署SpringBoot应用,就是这么6!
任何简单操作的背后,都有一套相当复杂的机制.本文将以SpringBoot应用的在Docker环境下的打包部署为例,详细讲解如何使用Jenkins一键打包部署SpringBoot应用. Jenkins简 ...
- 解决spring-boot-maven-plugin插件打包,springboot启动时报找不到主main问题
解决spring-boot-maven-plugin插件打包,springboot启动时报找不到主main问题 参考文章: (1)解决spring-boot-maven-plugin插件打包,spri ...
- 运行 dist 打包文件:简单得很!!!
项目打包完成后,会生成 dist 文件夹,如何检验 dist 文件夹呢? 1. 一般打包完成后会在项目根目录生成一个 dist 文件夹,此时,我们在项目根目录新建一个 js 文件(我以 server. ...
- dist打包报 ERROR Failed to compile with 606 errors,These dependencies were not found
dist打包报 ERROR Failed to compile with 606 errors , These dependencies were not found These dependenci ...
- Vue 首屏加载优化(dist 打包文件从 5M+ 缩减到 324kb)
最近在做 Vue 项目的首屏优化,效果不错,在这里将经验分享给大家,总的优化措施是以下四点. 优化方式1:将项目中用到的图片移动到百度云文件存储 优化方式2:使用路由懒加载 优化方式3:关闭 sour ...
- 在服务器上打包部署springboot+vue的项目(一)启动tomcat后打开浏览器点击登录无反应 页面空白问题
先记录查看与关闭端口的命令: netstat -ano|findstr "8080" taskkill /pid 5588 /f 打开某个端口: netsh firewall ad ...
- vue dist打包后找不到图片路径
打开dist文件夹下新生成的index.html文件,会发现页面空白,打开控制台会发现页面中引用的css和js文件都找不到: 说明引用路径错了,需要手动修改: 进入config/index.js 原配 ...
- 在服务器上打包部署springboot+vue的项目(二)让服务器上有sql数据,且可以进行用户交互
关于防火墙的说明: 防火墙是保障轻量应用服务器实例网络安全的重要手段,所提供的安全防护作用等同于云服务器中的安全组.您可以通过配置防火墙规则,允许或禁止轻量应用服务器实例对公网或私网的访问. 说明: ...
- SpringBoot系列三:SpringBoot基本概念(统一父 pom 管理、SpringBoot 代码测试、启动注解分析、配置访问路径、使用内置对象、项目打包发布)...
声明:本文来源于MLDN培训视频的课堂笔记,写在这里只是为了方便查阅. 1.了解SpringBoot的基本概念 2.具体内容 在之前所建立的 SpringBoot 项目只是根据官方文档实现的一个基础程 ...
最新文章
- NTU课程:MAS714(4):贪心
- webpackPlugin插件总结
- bash shell 循环读入每一行(转)
- vue中前端处理token过期的方法与axios请求拦截处理
- 简单的WINFORM窗体,体验WINFORM带来的快感
- 设计模式1【续】:动态设定行为
- c( )函数--R语言
- 图论及其应用 2016年 期末考试 答案总结
- 尚学堂百战程序员python_尚学堂百战程序员:Python之数据分析库
- Mujoco的关节与外力和驱动器
- 学习笔记之——基于深度学习的分类网络
- html 苹果没有出现弹窗,苹果手机弹窗bug是什么情况?苹果手机为什么会出现弹窗bug要怎么解决?...
- PS CC2019新手必学基础(首选项)设置
- 消极风险应对策略的区别
- html5手机密码修改,HTML5 Canvas简简单单实现手机九宫格手势密码解锁
- SCADS简介及应用
- 新学期,我的目标与展望。(中秋快乐)
- 15. 【C语言】Hanoi塔问题(Demo)
- 如何防止域名被劫持?网站域名被劫持怎么办?怎么处理?
- 再现“换桥奇迹”|人大金仓助力大型运营商完成营销系统国产化升级