diff --git a/package-lock.json b/package-lock.json index 71c74de3..3da3e945 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11330,9 +11330,9 @@ "dev": true }, "linkifyjs": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.7.tgz", - "integrity": "sha512-Cbn77BnYEslpAObZZoP6GVQHF1j5T6RsDydNq5RVxIy4eiZAiADRx7qHfWzfEMQecc1PtZFog1AsCGGX2WjQLA==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.8.tgz", + "integrity": "sha512-j3QpiEr4UYzN5foKhrr9Sr06VI9vSlI4HisDWt+7Mq+TWDwpJ6H/LLpogYsXcyUIJLVhGblXXdUnblHsVNMPpg==", "requires": { "jquery": "^3.3.1", "react": "^16.4.2", diff --git a/package.json b/package.json index 54a8b374..d3f13945 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@nguniversal/module-map-ngfactory-loader": "v7.0.2", "angulartics2": "latest", "express": "^4.15.2", - "linkifyjs": "2.1.7", + "linkifyjs": "^2.1.8", "ngx-markdown": "^8.2.1", "rxjs": "~6.4.0", "tslib": "^1.10.0", diff --git a/projects/ngx-linkifyjs/coverage/lcov-report/ngx-linkifyjs.pipe.ts.html b/projects/ngx-linkifyjs/coverage/lcov-report/ngx-linkifyjs.pipe.ts.html new file mode 100644 index 00000000..43d1b0d4 --- /dev/null +++ b/projects/ngx-linkifyjs/coverage/lcov-report/ngx-linkifyjs.pipe.ts.html @@ -0,0 +1,114 @@ + + + + Code coverage report for ngx-linkifyjs.pipe.ts + + + + + + + +
+
+

+ All files ngx-linkifyjs.pipe.ts +

+
+
+ 83.33% + Statements + 5/6 +
+
+ 0% + Branches + 0/2 +
+
+ 0% + Functions + 0/1 +
+
+ 75% + Lines + 3/4 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +161x +  +1x +  +  +  +  +  +1x +  +  +  +  +  +  + 
import {Pipe, PipeTransform} from '@angular/core';
+// @ts-ignore
+import linkifyStr from 'linkifyjs/string';
+import {NgxLinkifyOptions} from '../interfaces/ngx-linkifyjs.interface';
+ 
+@Pipe({
+  name: 'linkify'
+})
+export class NgxLinkifyjsPipe implements PipeTransform {
+ 
+  transform(value: string, options?: NgxLinkifyOptions): string {
+    return value ? linkifyStr(value, options) : value;
+  }
+ 
+}
+ 
+
+
+ + + + + + + + diff --git a/projects/ngx-linkifyjs/package.json b/projects/ngx-linkifyjs/package.json index d70ae474..bb3eb361 100644 --- a/projects/ngx-linkifyjs/package.json +++ b/projects/ngx-linkifyjs/package.json @@ -50,7 +50,7 @@ "peerDependencies": { "@angular/common": "^8.2.14", "@angular/core": "^8.2.14", - "linkifyjs": "2.1.7" + "linkifyjs": "^2.1.8" }, "engines": { "node": ">=10.0.0" diff --git a/webpack.server.config.js b/webpack.server.config.js index 6c98a99a..13deef7d 100644 --- a/webpack.server.config.js +++ b/webpack.server.config.js @@ -7,7 +7,12 @@ module.exports = { mode: 'none', entry: { // This is our Express server for Dynamic universal - server: './server.ts' + server: './server.ts', + // This is an example of Static prerendering (generative) + prerender: './prerender.ts' + }, + externals: { + './dist/server/main': 'require("./server/main")' }, target: 'node', resolve: { extensions: ['.ts', '.js'] }, @@ -20,6 +25,7 @@ module.exports = { filename: '[name].js' }, module: { + noParse: /polyfills-.*\.js/, rules: [ { test: /\.ts$/, loader: 'ts-loader' }, {