quartz icon indicating copy to clipboard operation
quartz copied to clipboard

bug: reloading fails if quartz in a subdirectory of a git project

Open aarnphm opened this issue 1 year ago • 0 comments

Describe the bug

Given the following folder structure

.git
repo
  --- quartz
  --- content
  ...

running cd docs && npx quartz build --serve won't trigger reload if any contents under quartz changes. We don't observe this behaviour if quartz exists under .git parent root

To Reproduce Steps to reproduce the behavior:

git clone https://github.com/aarnphm/tinymorph && cd tinymorph/docs
npm i
npx quartz build --serve --verbose
# edit any files under `quartz` won't trigger reload, including ts files

Screenshots and Source

The following is the transpiled-build.mjs.map of said reproduction

{
  "version": 3,
  "sources": ["../build.ts", "../util/perf.ts", "../processors/parse.ts", "../util/path.ts", "../util/log.ts", "../util/trace.ts", "../processors/filter.ts", "../plugins/transformers/twitter.ts", "../plugins/transformers/frontmatter.ts", "../i18n/locales/en-US.ts", "../i18n/locales/en-GB.ts", "../i18n/locales/fr-FR.ts", "../i18n/locales/it-IT.ts", "../i18n/locales/ja-JP.ts", "../i18n/locales/de-DE.ts", "../i18n/locales/nl-NL.ts", "../i18n/locales/ro-RO.ts", "../i18n/locales/ca-ES.ts", "../i18n/locales/es-ES.ts", "../i18n/locales/ar-SA.ts", "../i18n/locales/uk-UA.ts", "../i18n/locales/ru-RU.ts", "../i18n/locales/ko-KR.ts", "../i18n/locales/zh-CN.ts", "../i18n/locales/vi-VN.ts", "../i18n/locales/pt-BR.ts", "../i18n/locales/hu-HU.ts", "../i18n/locales/fa-IR.ts", "../i18n/locales/pl-PL.ts", "../i18n/index.ts", "../plugins/transformers/gfm.ts", "../plugins/transformers/citations.ts", "../plugins/transformers/lastmod.ts", "../plugins/transformers/latex.ts", "../plugins/transformers/description.ts", "../util/escape.ts", "../plugins/transformers/links.ts", "../plugins/transformers/ofm.ts", "../components/scripts/callout.inline.ts", "../components/scripts/checkbox.inline.ts", "../util/lang.ts", "../plugins/transformers/oxhugofm.ts", "../plugins/transformers/syntax.ts", "../plugins/transformers/toc.ts", "../plugins/transformers/linebreaks.ts", "../plugins/transformers/roam.ts", "../plugins/filters/draft.ts", "../plugins/emitters/contentPage.tsx", "../components/Header.tsx", "../components/scripts/clipboard.inline.ts", "../components/styles/clipboard.scss", "../components/Body.tsx", "../components/renderPage.tsx", "../util/resources.tsx", "../components/styles/author.scss", "../components/Author.tsx", "../util/jsx.tsx", "../components/pages/Content.tsx", "../components/styles/listPage.scss", "../components/Date.tsx", "../components/PageList.tsx", "../components/pages/TagContent.tsx", "../components/pages/FolderContent.tsx", "../components/pages/404.tsx", "../components/ArticleTitle.tsx", "../components/scripts/darkmode.inline.ts", "../components/styles/darkmode.scss", "../components/Darkmode.tsx", "../util/theme.ts", "../components/Head.tsx", "../components/PageTitle.tsx", "../components/ContentMeta.tsx", "../components/styles/contentMeta.scss", "../components/Spacer.tsx", "../components/styles/legacyToc.scss", "../components/styles/toc.scss", "../components/scripts/toc.inline.ts", "../components/TableOfContents.tsx", "../components/styles/explorer.scss", "../components/scripts/explorer.inline.ts", "../components/ExplorerNode.tsx", "../components/Explorer.tsx", "../components/TagList.tsx", "../components/scripts/graph.inline.ts", "../components/styles/graph.scss", "../components/Graph.tsx", "../components/styles/backlinks.scss", "../components/Backlinks.tsx", "../components/styles/search.scss", "../components/scripts/search.inline.ts", "../components/Search.tsx", "../../package.json", "../components/Footer.tsx", "../components/DesktopOnly.tsx", "../components/MobileOnly.tsx", "../components/styles/minimal.scss", "../components/MinimalFooter.tsx", "../components/RecentNotes.tsx", "../components/styles/breadcrumbs.scss", "../components/Breadcrumbs.tsx", "../components/scripts/comments.inline.ts", "../components/styles/comments.scss", "../components/Comments.tsx", "../../quartz.layout.ts", "../plugins/emitters/helpers.ts", "../depgraph.ts", "../plugins/vfile.ts", "../plugins/emitters/tagPage.tsx", "../plugins/emitters/folderPage.tsx", "../plugins/emitters/contentIndex.ts", "../plugins/emitters/aliases.ts", "../plugins/emitters/assets.ts", "../util/glob.ts", "../plugins/emitters/static.ts", "../components/scripts/spa.inline.ts", "../components/scripts/popover.inline.ts", "../styles/custom.scss", "../components/styles/popover.scss", "../plugins/emitters/componentResources.ts", "../plugins/emitters/404.tsx", "../plugins/emitters/cname.ts", "../plugins/index.ts", "../processors/emit.ts", "../../quartz.config.ts", "../util/sourcemap.ts"]
}

If you build quartz on v4 the transpiled-build.mjs.map include all related files under quartz folder.

Desktop (please complete the following information):

  • Quartz Version: v4
  • node Version: v22.8.0
  • npm version: 10.8.2
  • OS: darwin sequoia
  • Browser chrome

Additional context

Threads in discord: 1285022890751950880

aarnphm avatar Oct 01 '24 00:10 aarnphm