mirror of
https://github.com/Febbweiss/springboot-react-webpack.git
synced 2026-03-04 22:25:34 +00:00
Feature: add production profile to minify resources
This commit is contained in:
@@ -25,7 +25,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack-dev-server --hot --inline --devtool eval --progress --colors --content-base build --port 9999",
|
"dev": "webpack-dev-server --hot --inline --devtool eval --progress --colors --content-base build --port 9999",
|
||||||
"dev-build": "webpack -d --display-modules",
|
"dev-build": "webpack -d --progress --colors",
|
||||||
|
"prod-build": "webpack -d -p --colors",
|
||||||
"watch": "webpack --watch -d"
|
"watch": "webpack --watch -d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
pom.xml
36
pom.xml
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
|
<packaging.type>war</packaging.type>
|
||||||
<maven.deploy.skip>true</maven.deploy.skip>
|
<maven.deploy.skip>true</maven.deploy.skip>
|
||||||
<project.scm.id>jazzhub</project.scm.id>
|
<project.scm.id>jazzhub</project.scm.id>
|
||||||
<docker.image.prefix>opensaas</docker.image.prefix>
|
<docker.image.prefix>opensaas</docker.image.prefix>
|
||||||
@@ -128,15 +129,6 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
|
||||||
<id>webapp</id>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
<properties>
|
|
||||||
<packaging.type>war</packaging.type>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>docker</id>
|
<id>docker</id>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -175,6 +167,32 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>production</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.eirslett</groupId>
|
||||||
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
|
<version>0.0.29</version>
|
||||||
|
<configuration>
|
||||||
|
<workingDirectory>${project.build.directory}</workingDirectory>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>npm</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<arguments>run-script prod-build</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
Reference in New Issue
Block a user