File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
packages/astro/src/content Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ import {
20
20
} from './consts.js' ;
21
21
import { hasContentFlag } from './utils.js' ;
22
22
23
- // TODO: replace with `hasContentFlag`
24
- function isPropagatedAsset ( viteId : string ) : boolean {
25
- const url = new URL ( viteId , 'file://' ) ;
26
- return url . searchParams . has ( PROPAGATED_ASSET_FLAG ) ;
27
- }
28
-
29
23
export function astroContentAssetPropagationPlugin ( {
30
24
mode,
31
25
settings,
@@ -62,7 +56,7 @@ export function astroContentAssetPropagationPlugin({
62
56
}
63
57
} ,
64
58
load ( id ) {
65
- if ( isPropagatedAsset ( id ) ) {
59
+ if ( hasContentFlag ( id , CONTENT_RENDER_FLAG ) ) {
66
60
const basePath = id . split ( '?' ) [ 0 ] ;
67
61
const code = `
68
62
function getMod() {
@@ -83,7 +77,7 @@ export function astroContentAssetPropagationPlugin({
83
77
} ,
84
78
async transform ( code , id , options ) {
85
79
if ( ! options ?. ssr ) return ;
86
- if ( devModuleLoader && isPropagatedAsset ( id ) ) {
80
+ if ( devModuleLoader && hasContentFlag ( id , CONTENT_RENDER_FLAG ) ) {
87
81
const basePath = id . split ( '?' ) [ 0 ] ;
88
82
if ( ! devModuleLoader . getModuleById ( basePath ) ?. ssrModule ) {
89
83
await devModuleLoader . import ( basePath ) ;
You can’t perform that action at this time.
0 commit comments