From 5e578a292aac322083f431e84ed91bb8c07134db Mon Sep 17 00:00:00 2001 From: Terncode Date: Mon, 23 Mar 2026 22:20:57 +0100 Subject: [PATCH] Fix prod builder --- package.json | 4 ++-- .../services/rollbarErrorHandler.ts | 11 +++++----- tsconfig-aot-admin.json | 20 +++++++++++++++++++ tsconfig-aot-es.json | 0 tsconfig-aot-tools.json | 20 +++++++++++++++++++ tsconfig-aot.json | 15 ++++---------- tsconfig.json | 13 +++++++----- tsconfig.tools.json | 0 webpack.prod.js | 2 +- 9 files changed, 60 insertions(+), 25 deletions(-) create mode 100755 tsconfig-aot-admin.json mode change 100644 => 100755 tsconfig-aot-es.json create mode 100755 tsconfig-aot-tools.json mode change 100644 => 100755 tsconfig-aot.json mode change 100644 => 100755 tsconfig.json mode change 100644 => 100755 tsconfig.tools.json diff --git a/package.json b/package.json index 6ca3960..90be030 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "sw-generate": "workbox generateSW workbox-config.js", "sw-uglify": "uglifyjs build/sw.js -o build/sw.min.js", "sw": "npm run sw-generate && npm run sw-uglify", - "ts": "tsc --rootDir src/ts --outDir src/scripts --pretty", - "ts-tools": "tsc --rootDir src/ts --outDir src/scripts --pretty -p tsconfig.tools.json", + "ts": "tsc", + "ts-tools": "tsc -p tsconfig.tools.json", "ts-watch": "npm run ts -- --watch", "ts-cov": "npm run ts -- --target es5", "ts-cov-watch": "npm run ts -- --target es5 --watch", diff --git a/src/ts/components/services/rollbarErrorHandler.ts b/src/ts/components/services/rollbarErrorHandler.ts index 20b9d2d..3fdee87 100644 --- a/src/ts/components/services/rollbarErrorHandler.ts +++ b/src/ts/components/services/rollbarErrorHandler.ts @@ -42,12 +42,11 @@ export function rollbarFactory() { } @Injectable() -export class RollbarErrorHandler extends ErrorHandler { - constructor(private injector: Injector) { - super(); - } +export class RollbarErrorHandler implements ErrorHandler { + private errorHandler = new ErrorHandler(); + constructor(private injector: Injector) {} handleError(error: any) { - super.handleError(error); + this.errorHandler.handleError(error); if (!DEVELOPMENT && rollbarConfig.accessToken) { const rollbar = this.injector.get(RollbarService); @@ -58,4 +57,4 @@ export class RollbarErrorHandler extends ErrorHandler { } } } -} +} \ No newline at end of file diff --git a/tsconfig-aot-admin.json b/tsconfig-aot-admin.json new file mode 100755 index 0000000..598a68f --- /dev/null +++ b/tsconfig-aot-admin.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "target": "es5", + "module": "es2015", + "baseUrl": ".", + "preserveConstEnums": false, + "paths": { + "lodash": ["src/ts/lodash.ts"] + } + }, + "files": [ + "src/ts/bootstrap-admin.ts" + ], + "angularCompilerOptions": { + "genDir": "src/ts", + "skipMetadataEmit": true, + "preserveWhitespaces": true + } +} \ No newline at end of file diff --git a/tsconfig-aot-es.json b/tsconfig-aot-es.json old mode 100644 new mode 100755 diff --git a/tsconfig-aot-tools.json b/tsconfig-aot-tools.json new file mode 100755 index 0000000..da60508 --- /dev/null +++ b/tsconfig-aot-tools.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "target": "es5", + "module": "es2015", + "baseUrl": ".", + "preserveConstEnums": false, + "paths": { + "lodash": ["src/ts/lodash.ts"] + } + }, + "files": [ + "src/ts/bootstrap-tools.ts" + ], + "angularCompilerOptions": { + "genDir": "src/ts", + "skipMetadataEmit": true, + "preserveWhitespaces": true + } +} \ No newline at end of file diff --git a/tsconfig-aot.json b/tsconfig-aot.json old mode 100644 new mode 100755 index 6b8a53e..3ec80b5 --- a/tsconfig-aot.json +++ b/tsconfig-aot.json @@ -5,19 +5,12 @@ "module": "es2015", "baseUrl": ".", "preserveConstEnums": false, - "paths": { + "paths": { "lodash": ["src/ts/lodash.ts"] - } + } }, - "exclude": [ - "build", - "tools", - "src/scripts", - "src/ts/server", - "src/ts/tests", - "src/ts/tools", - "src/ts/experiments", - "node_modules" + "files": [ + "src/ts/bootstrap.ts" ], "angularCompilerOptions": { "genDir": "src/ts", diff --git a/tsconfig.json b/tsconfig.json old mode 100644 new mode 100755 index 7f46d22..63de80d --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,13 @@ { "compilerOptions": { - "target": "es2017", + "target": "ES2020", "lib": [ "dom", - "es6" + "ES2020" ], + "rootDir": "src/ts", + "outDir": "src/scripts", + "pretty": true, "module": "commonjs", "moduleResolution": "node", "importHelpers": true, @@ -18,8 +21,8 @@ "strict": true, "strictFunctionTypes": true, "sourceMap": true, - "skipLibCheck": true, - "preserveConstEnums": true + "preserveConstEnums": true, + "skipLibCheck": true }, "exclude": [ "build", @@ -27,4 +30,4 @@ "src/scripts", "node_modules" ] -} \ No newline at end of file +} diff --git a/tsconfig.tools.json b/tsconfig.tools.json old mode 100644 new mode 100755 diff --git a/webpack.prod.js b/webpack.prod.js index 33ed4e4..e498d6f 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -62,7 +62,7 @@ module.exports = (args = {}) => }, output: Object.assign({}, common.output, { filename: '[name]-[chunkhash:10].js', - path: path.resolve(__dirname, 'dist', 'browser' , outDir, 'scripts'), + path: path.resolve(__dirname, 'build', outDir, 'scripts'), }), devtool: script === 'bootstrap' ? 'source-map' : false, module: {