@@ -38,7 +38,18 @@ <h2>Asset Imports from JS</h2>
38
38
</ li >
39
39
< li >
40
40
From publicDir (js): < code class ="public-js-import "> </ code > Content:
41
- < code class ="public-js-import-content "> </ code >
41
+ < code class ="public-js-import-content "> </ code > Content-Type:
42
+ < code class ="public-js-import-content-type "> </ code >
43
+ </ li >
44
+ < li >
45
+ From publicDir (ts): < code class ="public-ts-import "> </ code > Content:
46
+ < code class ="public-ts-import-content "> </ code > Content-Type:
47
+ < code class ="public-ts-import-content-type "> </ code >
48
+ </ li >
49
+ < li >
50
+ From publicDir (mts): < code class ="public-mts-import "> </ code > Content:
51
+ < code class ="public-mts-import-content "> </ code > Content-Type:
52
+ < code class ="public-mts-import-content-type "> </ code >
42
53
</ li >
43
54
</ ul >
44
55
@@ -494,6 +505,32 @@ <h3>assets in template</h3>
494
505
; ( async ( ) => {
495
506
const res = await fetch ( publicJsUrl )
496
507
text ( '.public-js-import-content' , await res . text ( ) )
508
+ text (
509
+ '.public-js-import-content-type' ,
510
+ await res . headers . get ( 'Content-Type' ) ,
511
+ )
512
+ } ) ( )
513
+
514
+ import publicTsUrl from '/raw.ts?url'
515
+ text ( '.public-ts-import' , publicTsUrl )
516
+ ; ( async ( ) => {
517
+ const res = await fetch ( publicTsUrl )
518
+ text ( '.public-ts-import-content' , await res . text ( ) )
519
+ text (
520
+ '.public-ts-import-content-type' ,
521
+ await res . headers . get ( 'Content-Type' ) ,
522
+ )
523
+ } ) ( )
524
+
525
+ import publicMtsUrl from '/raw.mts?url'
526
+ text ( '.public-mts-import' , publicMtsUrl )
527
+ ; ( async ( ) => {
528
+ const res = await fetch ( publicMtsUrl )
529
+ text ( '.public-mts-import-content' , await res . text ( ) )
530
+ text (
531
+ '.public-mts-import-content-type' ,
532
+ await res . headers . get ( 'Content-Type' ) ,
533
+ )
497
534
} ) ( )
498
535
499
536
import svgFrag from './nested/fragment.svg'
0 commit comments