@@ -38,7 +38,18 @@ <h2>Asset Imports from JS</h2>
3838 </ li >
3939 < li >
4040 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 >
4253 </ li >
4354</ ul >
4455
@@ -494,6 +505,32 @@ <h3>assets in template</h3>
494505 ; ( async ( ) => {
495506 const res = await fetch ( publicJsUrl )
496507 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+ )
497534 } ) ( )
498535
499536 import svgFrag from './nested/fragment.svg'
0 commit comments