diff --git a/angular.json b/angular.json index db28d094..3d6c310f 100644 --- a/angular.json +++ b/angular.json @@ -18,12 +18,12 @@ "prefix": "jhi", "architect": { "build": { - "builder": "@angular-devkit/build-angular:application", + "builder": "@angular-devkit/build-angular:browser-esbuild", "options": { "allowedCommonJsDependencies": ["sockjs-client", "webstomp-client"], "outputPath": "build/resources/main/static/", "index": "src/main/webapp/index.html", - "browser": "src/main/webapp/main.ts", + "main": "src/main/webapp/main.ts", "polyfills": ["./src/main/webapp/sockjs-client.polyfill", "zone.js"], "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", @@ -43,7 +43,8 @@ "sourceMap": false, "namedChunks": true, "extractLicenses": true, - "serviceWorker": "ngsw-config.json", + "serviceWorker": true, + "ngswConfigPath": "ngsw-config.json", "budgets": [ { "type": "initial", diff --git a/gradle/profile_dev.gradle b/gradle/profile_dev.gradle index 3fc82af0..b1415891 100644 --- a/gradle/profile_dev.gradle +++ b/gradle/profile_dev.gradle @@ -45,7 +45,7 @@ task webapp(type: NpmTask) { inputs.dir("src/main/webapp/") .withPropertyName("webapp-source-dir") .withPathSensitivity(PathSensitivity.RELATIVE) - outputs.dir("build/resources/main/static/browser/") + outputs.dir("build/resources/main/static/") .withPropertyName("webapp-build-dir") dependsOn npmInstall diff --git a/gradle/war.gradle b/gradle/war.gradle index 85b0963d..28c0706e 100644 --- a/gradle/war.gradle +++ b/gradle/war.gradle @@ -7,7 +7,7 @@ bootWar { } war { - webAppDirName = "build/resources/main/static/browser/" + webAppDirName = "build/resources/main/static/" webXml = file("${project.rootDir}/src/main/webapp/WEB-INF/web.xml") enabled = true archiveExtension = "war.original" diff --git a/src/main/java/de/tum/cit/ase/config/WebConfigurer.java b/src/main/java/de/tum/cit/ase/config/WebConfigurer.java index 6c85b860..a0bbbd4f 100644 --- a/src/main/java/de/tum/cit/ase/config/WebConfigurer.java +++ b/src/main/java/de/tum/cit/ase/config/WebConfigurer.java @@ -59,7 +59,7 @@ private void setLocationForStaticAssets(WebServerFactory server) { if (server instanceof ConfigurableServletWebServerFactory servletWebServer) { File root; String prefixPath = resolvePathPrefix(); - root = new File(prefixPath + "build/resources/main/static/browser/"); + root = new File(prefixPath + "build/resources/main/static/"); if (root.exists() && root.isDirectory()) { servletWebServer.setDocumentRoot(root); } diff --git a/src/test/java/de/tum/cit/ase/config/WebConfigurerTest.java b/src/test/java/de/tum/cit/ase/config/WebConfigurerTest.java index b94c4309..7d07406c 100644 --- a/src/test/java/de/tum/cit/ase/config/WebConfigurerTest.java +++ b/src/test/java/de/tum/cit/ase/config/WebConfigurerTest.java @@ -57,7 +57,7 @@ void shouldCustomizeServletContainer() { assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html"); assertThat(container.getMimeMappings().get("json")).isEqualTo("application/json"); if (container.getDocumentRoot() != null) { - assertThat(container.getDocumentRoot()).isEqualTo(new File("build/resources/main/static/browser/")); + assertThat(container.getDocumentRoot()).isEqualTo(new File("build/resources/main/static/")); } }