diff --git a/Dockerfile b/Dockerfile index 7159e11c..1dae6bbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ FROM node:18.13.0-alpine AS build USER node WORKDIR /home/node COPY --chown=node package*.json ./ -RUN npm ci --ignore-scripts -RUN npm rebuild @parcel/watcher nice-napi nx esbuild @swc/core +RUN npm ci --ignore-scripts && npm rebuild @parcel/watcher nice-napi nx esbuild @swc/core COPY --chown=node . . ARG app RUN npm run build ${app} @@ -15,6 +14,6 @@ RUN rm -rf /usr/share/nginx/html/* COPY nginx.conf /etc/nginx/ COPY ./docker-entrypoint.sh /etc/nginx/ ARG app -COPY --from=build /home/node/dist/apps/${app} /usr/share/nginx/html +COPY --from=build /home/node/dist/apps/${app}/browser /usr/share/nginx/html ENTRYPOINT ["/etc/nginx/docker-entrypoint.sh"] CMD ["nginx"] diff --git a/apps/cardio-patient/project.json b/apps/cardio-patient/project.json index bed08175..d15bb892 100644 --- a/apps/cardio-patient/project.json +++ b/apps/cardio-patient/project.json @@ -11,12 +11,11 @@ }, "targets": { "build": { - "executor": "@angular-devkit/build-angular:browser", + "executor": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/apps/cardio-patient", "index": "apps/cardio-patient/src/index.html", - "main": "apps/cardio-patient/src/main.ts", - "polyfills": "apps/cardio-patient/src/polyfills.ts", + "polyfills": ["apps/cardio-patient/src/polyfills.ts"], "tsConfig": "apps/cardio-patient/tsconfig.json", "inlineStyleLanguage": "scss", "assets": ["apps/cardio-patient/src/favicon.ico", "apps/cardio-patient/src/assets", "apps/cardio-patient/src/launch.html"], @@ -27,7 +26,8 @@ "inject": false, "bundleName": "fhirclient" } - ] + ], + "browser": "apps/cardio-patient/src/main.ts" }, "configurations": { "production": { @@ -53,9 +53,7 @@ "tsConfig": "apps/cardio-patient/tsconfig.app.json" }, "development": { - "buildOptimizer": false, "optimization": false, - "vendorChunk": true, "extractLicenses": false, "sourceMap": true, "namedChunks": true, @@ -108,7 +106,7 @@ "karmaConfig": "apps/cardio-patient/karma.conf.js", "inlineStyleLanguage": "scss", "assets": ["apps/cardio-patient/src/favicon.ico", "apps/cardio-patient/src/assets"], - "styles": ["libs/ngx-charts-on-fhir/src/default.scss", "apps/cardio-patient/src/styles.scss"], + "styles": ["apps/cardio-patient/src/styles.scss"], "scripts": [] } } diff --git a/apps/cardio-patient/tsconfig.json b/apps/cardio-patient/tsconfig.json index 5b00863f..3a35b92f 100644 --- a/apps/cardio-patient/tsconfig.json +++ b/apps/cardio-patient/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.json", "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "compilerOptions": { + "esModuleInterop": true + } } diff --git a/apps/cardio/project.json b/apps/cardio/project.json index 9b1d212c..7f342f82 100644 --- a/apps/cardio/project.json +++ b/apps/cardio/project.json @@ -11,23 +11,23 @@ }, "targets": { "build": { - "executor": "@angular-devkit/build-angular:browser", + "executor": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/apps/cardio", "index": "apps/cardio/src/index.html", - "main": "apps/cardio/src/main.ts", - "polyfills": "apps/cardio/src/polyfills.ts", + "polyfills": ["apps/cardio/src/polyfills.ts"], "tsConfig": "apps/cardio/tsconfig.json", "inlineStyleLanguage": "scss", "assets": ["apps/cardio/src/favicon.ico", "apps/cardio/src/assets", "apps/cardio/src/launch.html"], - "styles": ["libs/ngx-charts-on-fhir/src/default.scss", "apps/cardio/src/styles.scss"], + "styles": ["apps/cardio/src/styles.scss"], "scripts": [ { "input": "node_modules/fhirclient/build/fhir-client.js", "inject": false, "bundleName": "fhirclient" } - ] + ], + "browser": "apps/cardio/src/main.ts" }, "configurations": { "production": { @@ -53,9 +53,7 @@ "tsConfig": "apps/cardio/tsconfig.app.json" }, "development": { - "buildOptimizer": false, "optimization": false, - "vendorChunk": true, "extractLicenses": false, "sourceMap": true, "namedChunks": true, @@ -108,7 +106,7 @@ "karmaConfig": "apps/cardio/karma.conf.js", "inlineStyleLanguage": "scss", "assets": ["apps/cardio/src/favicon.ico", "apps/cardio/src/assets"], - "styles": ["libs/ngx-charts-on-fhir/src/default.scss", "apps/cardio/src/styles.scss"], + "styles": ["apps/cardio/src/styles.scss"], "scripts": [] } } diff --git a/apps/cardio/tsconfig.json b/apps/cardio/tsconfig.json index 5b00863f..3a35b92f 100644 --- a/apps/cardio/tsconfig.json +++ b/apps/cardio/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.json", "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "compilerOptions": { + "esModuleInterop": true + } } diff --git a/apps/documentation/project.json b/apps/documentation/project.json index 3b425c0e..9ed75279 100644 --- a/apps/documentation/project.json +++ b/apps/documentation/project.json @@ -38,7 +38,7 @@ "apps/documentation/src/favicon.ico", "apps/documentation/src/assets" ], - "styles": ["node_modules/@ng-doc/app/styles/global.css", "apps/documentation/src/styles.scss"], + "styles": ["libs/ngx-charts-on-fhir/src/default.scss", "node_modules/@ng-doc/app/styles/global.css", "apps/documentation/src/styles.scss"], "scripts": [], "allowedCommonJsDependencies": ["@ng-doc/core"] }, diff --git a/apps/documentation/src/styles.scss b/apps/documentation/src/styles.scss index caf0afb6..02e1fc35 100644 --- a/apps/documentation/src/styles.scss +++ b/apps/documentation/src/styles.scss @@ -1,7 +1,4 @@ /* You can add global styles to this file, and also import other style files */ -$material-icons-font-path: "material-icons/iconfont/"; -@import "libs/ngx-charts-on-fhir/src/default.scss"; - :root { --ng-doc-app-max-width: 1600px; } diff --git a/apps/documentation/tsconfig.json b/apps/documentation/tsconfig.json index 528c4b57..acd7a65e 100644 --- a/apps/documentation/tsconfig.json +++ b/apps/documentation/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "../../dist/out-tsc", - "types": [] + "types": [], + "esModuleInterop": true }, "files": ["src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"] diff --git a/apps/showcase/project.json b/apps/showcase/project.json index 219b1fda..008f8adf 100644 --- a/apps/showcase/project.json +++ b/apps/showcase/project.json @@ -11,12 +11,11 @@ }, "targets": { "build": { - "executor": "@angular-devkit/build-angular:browser", + "executor": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/apps/showcase", "index": "apps/showcase/src/index.html", - "main": "apps/showcase/src/main.ts", - "polyfills": "apps/showcase/src/polyfills.ts", + "polyfills": ["apps/showcase/src/polyfills.ts"], "tsConfig": "apps/showcase/tsconfig.json", "inlineStyleLanguage": "scss", "assets": ["apps/showcase/src/favicon.ico", "apps/showcase/src/assets", "apps/showcase/src/launch.html"], @@ -27,7 +26,8 @@ "inject": false, "bundleName": "fhirclient" } - ] + ], + "browser": "apps/showcase/src/main.ts" }, "configurations": { "production": { @@ -53,9 +53,7 @@ "tsConfig": "apps/showcase/tsconfig.app.json" }, "development": { - "buildOptimizer": false, "optimization": false, - "vendorChunk": true, "extractLicenses": false, "sourceMap": true, "namedChunks": true, @@ -119,7 +117,7 @@ "karmaConfig": "apps/showcase/karma.conf.js", "inlineStyleLanguage": "scss", "assets": ["apps/showcase/src/favicon.ico", "apps/showcase/src/assets"], - "styles": ["libs/ngx-charts-on-fhir/src/default.scss", "apps/showcase/src/styles.scss"], + "styles": ["apps/showcase/src/styles.scss"], "scripts": [] } } diff --git a/apps/showcase/tsconfig.json b/apps/showcase/tsconfig.json index 5b00863f..3a35b92f 100644 --- a/apps/showcase/tsconfig.json +++ b/apps/showcase/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.json", "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "compilerOptions": { + "esModuleInterop": true + } } diff --git a/libs/ngx-charts-on-fhir/package.json b/libs/ngx-charts-on-fhir/package.json index ff9cfb22..c7a0aa90 100644 --- a/libs/ngx-charts-on-fhir/package.json +++ b/libs/ngx-charts-on-fhir/package.json @@ -1,6 +1,6 @@ { "name": "@elimuinformatics/ngx-charts-on-fhir", - "version": "4.0.0", + "version": "4.0.1", "description": "Charts-on-FHIR: A data visualization library for SMART-on-FHIR healthcare applications", "license": "Apache-2.0", "homepage": "https://elimuinformatics.github.io/charts-on-fhir", diff --git a/libs/ngx-charts-on-fhir/src/default-fonts.scss b/libs/ngx-charts-on-fhir/src/default-fonts.scss index cbfc9e6b..a9626933 100644 --- a/libs/ngx-charts-on-fhir/src/default-fonts.scss +++ b/libs/ngx-charts-on-fhir/src/default-fonts.scss @@ -1,3 +1,5 @@ +$material-icons-font-path: "material-icons/iconfont/"; + @import "material-icons/iconfont/material-icons.scss"; @import "@fontsource/roboto/300.css"; @import "@fontsource/roboto/400.css";