-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Content collections] Load MDX hoisted scripts in dev (#6035)
* chore: script, rename delayed -> propagated * fix: consistent propagatedAssets flag * feat: inject those scripts in dev! * test: scripts included in dev and build * chore: add TODO for prod build fix * chore: changeset
- Loading branch information
1 parent
9bb0bfa
commit b4432cd
Showing
21 changed files
with
264 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fix: Astro component scripts now load in development when using MDX + Content Collections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
export const contentFileExts = ['.md', '.mdx']; | ||
export const DELAYED_ASSET_FLAG = 'astroAssetSsr'; | ||
export const PROPAGATED_ASSET_FLAG = 'astroPropagatedAssets'; | ||
export const CONTENT_FLAG = 'astroContent'; | ||
export const VIRTUAL_MODULE_ID = 'astro:content'; | ||
export const LINKS_PLACEHOLDER = '@@ASTRO-LINKS@@'; | ||
export const STYLES_PLACEHOLDER = '@@ASTRO-STYLES@@'; | ||
export const SCRIPTS_PLACEHOLDER = '@@ASTRO-SCRIPTS@@'; | ||
|
||
export const CONTENT_TYPES_FILE = 'types.d.ts'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export { createContentTypesGenerator } from './types-generator.js'; | ||
export { contentObservable, getContentPaths, getDotAstroTypeReference } from './utils.js'; | ||
export { | ||
astroBundleDelayedAssetPlugin, | ||
astroDelayedAssetPlugin, | ||
astroContentProdBundlePlugin, | ||
astroContentAssetPropagationPlugin, | ||
} from './vite-plugin-content-assets.js'; | ||
export { astroContentServerPlugin } from './vite-plugin-content-server.js'; | ||
export { astroContentVirtualModPlugin } from './vite-plugin-content-virtual-mod.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.