Skip to content

Commit

Permalink
MDX: use different algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
fuma-nama committed Jan 4, 2025
1 parent 0e8be0e commit 2140aea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mdx/src/config/cached.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function loadConfigCached(
* Generate hash based on the content of config
*/
export async function getConfigHash(configPath: string): Promise<string> {
const hash = createHash('sha256');
const hash = createHash('md5');
const rs = fs.createReadStream(configPath);

for await (const chunk of rs) {
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/src/loader-mdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default async function loader(
const { _ctx } = this.getOptions();
const matter = grayMatter(source);

// notice that `resourceQuery` can be missing (e.g. on Turbopack)
// notice that `resourceQuery` can be missing (e.g. `page.mdx`)
const {
hash: configHash = await getConfigHash(_ctx.configPath),
collection: collectionId,
Expand Down

0 comments on commit 2140aea

Please sign in to comment.