@dunx/create-app 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -80,9 +80,14 @@ export class DocsDemo {
|
|
|
80
80
|
// markup, with both script bodies removed. Inside a <script> everything is
|
|
81
81
|
// text, and minified React's own string table contains `src=` and `<script`.
|
|
82
82
|
const shell = html.replace(/(<script[^>]*>)[\s\S]*?(<\/script>)/g, '$1$2');
|
|
83
|
+
// A `<link>` counts only if it would actually fetch. The page carries one
|
|
84
|
+
// for its favicon, as a `data:` URI, which the browser never requests.
|
|
85
|
+
const fetchedLink = [...shell.matchAll(/<link\b[^>]*href="([^"]*)"/g)].some(
|
|
86
|
+
([, href]) => href !== undefined && !href.startsWith('data:'),
|
|
87
|
+
);
|
|
83
88
|
const external =
|
|
84
89
|
/\ssrc=/.test(shell) ||
|
|
85
|
-
|
|
90
|
+
fetchedLink ||
|
|
86
91
|
/url\(\s*["']?(https?:)?\/\//.test(html) ||
|
|
87
92
|
html.includes('//cdn');
|
|
88
93
|
logger.info(
|