diff --git a/projects/demo/webpack.config.ts b/projects/demo/webpack.config.ts index 8fb40a152..d0a9ca080 100644 --- a/projects/demo/webpack.config.ts +++ b/projects/demo/webpack.config.ts @@ -22,34 +22,6 @@ const RAW_QUERY = /raw/; */ const DONT_MUTATE_RAW_FILE_CONTENTS = ['*.ts', '*.less', '*.html', '*.css']; -/** - * [Fixed bug in Node.js 18] - * error:0308010C:digital envelope routines::unsupported - * - * TODO: after upgrading of angular/nx deps run `npm audit fix` and drop this temporary workaround - * Learn more: https://stackoverflow.com/a/73027407 - * - * https://github.com/webpack/webpack/issues/13572#issuecomment-923736472 - * Useful when needing to revert to a legacy algorithm - * (OpenSSL / potentially less secure one) to temporarily - * address any compatibility issues. - * - * output.hashFunction doesn't work now, - * upgrade @angular-devkit/build-angular to v14 and use - * - * output: { - * hashFunction: `xxhash64`, - * }, - * - * instead of: - */ -const crypto = require('crypto'); - -const fallbackCreateHash = crypto.createHash; - -crypto.createHash = (algorithm: string) => - fallbackCreateHash(algorithm === 'md4' ? 'sha256' : algorithm); - const config: Configuration = { module: { /** @@ -70,11 +42,15 @@ const config: Configuration = { vue$: 'vue/dist/vue.esm-bundler.js', }, }, + output: { + hashFunction: 'xxhash64', + }, }; export default (ngConfigs: Configuration): Configuration => { const ngRules = [...(ngConfigs.module?.rules || [])].map(rule => { if ( + rule && typeof rule === 'object' && DONT_MUTATE_RAW_FILE_CONTENTS.some( pattern => rule.test instanceof RegExp && rule.test?.test(pattern), diff --git a/tsconfig.json b/tsconfig.json index a6d2f49e7..c800b1cbc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "@taiga-ui/tsconfig", - "exclude": ["projects/demo-integrations"], + "exclude": ["projects/demo-integrations", "projects/**/*.spec.ts"], "angularCompilerOptions": { "strictTemplates": true },