首页 > 解决方案 > Spring Boot, Vue.js and npm watch

问题描述

I have a stack containing Spring-Boot and Vue.js. By maven configuration project is separated into two modules: frontend and backend. During the mvn clean install plugin exec-maven-plugin build frontend part. On the backend side, plugin maven-resources-plugin copies frontend build into aprropriate directory. Finally, the jar with spring-boot and frontend side is created.

The problem is, that this configuration is completeally unconvinient for development process:

  1. I am running spring-boot application under intellij.
  2. I am running "watch": "vue-cli-service build --watch",
  3. When change on the frontend side occures, frontend build is done and ./frontend/target/dist directory is changed.
  4. I manually copy ./frontend/target/dist into ./backend/target/META-INF/.....

  5. Frontend changes are visible after page is reloaded.

The question is: is it possible to change target directory for frontend build process?

标签: spring-bootnpmvuejs2

解决方案


推荐阅读