Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] Skip loading source for non-editable modules #41588

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Only skip resolving imports
bharatkashyap committed Mar 29, 2024
commit 46ecf9d8b5185e33b56032e5d682e51d8aa55cbb
9 changes: 6 additions & 3 deletions packages/markdown/loader.js
Original file line number Diff line number Diff line change
@@ -164,9 +164,12 @@ module.exports = async function demoLoader() {
raw: await fs.readFile(moduleFilepath, { encoding: 'utf8' }),
};
demoModuleIDs.add(moduleID);
extractImports(demos[demoName].raw).forEach((importModuleID) =>
importedModuleIDs.add(importModuleID),
);
// Skip non-editable demos
if (!nonEditableDemos.has(demoName)) {
extractImports(demos[demoName].raw).forEach((importModuleID) =>
importedModuleIDs.add(importModuleID),
);
}

if (multipleDemoVersionsUsed) {
// Add Tailwind demo data