본문 바로가기

Vue.js

npm run build / npm run serve 한번에 해주는 플러그인 (maven)

https://eastgyu.github.io/spring/Spring-Vue/

 

[Spring] Spring Boot 와 Vue.js 연동하기

Spring Boot와 Vue.js 연동하기

eastgyu.github.io

pom.xml에 다음추가

-----------------------------------------------------------------------------------------------------------------------------------

<build> <plugins> ... <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ --> <version>1.8.0</version> <configuration> <!-- pom.xml 이 있는 path 경로 --> <installDirectory>frontend</installDirectory> <workingDirectory>frontend</workingDirectory> </configuration> <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md --> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> <configuration> <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions --> <nodeVersion>v8.11.1</nodeVersion> <npmVersion>5.6.0</npmVersion> </configuration> </execution> <execution> <id>npm install</id> <goals> <goal>npm</goal> </goals> <!-- Optional configuration which provides for running any npm command --> <configuration> <arguments>install</arguments> </configuration> </execution> <execution> <id>npm run build</id> <goals> <goal>npm</goal> </goals> <configuration> <arguments>run build</arguments> </configuration> </execution> </executions> </plugin> </plugins> </build>

-----------------------------------------------------------------------------------------------------------------------------------