GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(content): revert pages to only app as layers also inherit it · nuxt-modules/tailwindcss@4eea740

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/internal-context
    • load.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/internal-context/load.ts‎

Copy file name to clipboardExpand all lines: src/internal-context/load.ts
+10-12Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,17 @@ const createInternalContext = async (moduleOptions: ModuleOptions, nuxt = useNux
7676
if (!importDirs.includes(utilsDir)) importDirs.push(utilsDir)
7777

7878
const isLayer = rootDir !== nuxt.options.rootDir
79-
const rootProjectFiles: string[] = []
8079

81-
if (!isLayer) {
82-
const pageFiles = pagesContentPath.tryUse()
80+
const pagePaths: string[] = []
81+
const pageFiles = pagesContentPath.tryUse()
8382

84-
if (moduleOptions.experimental?.strictScanContentPaths && pageFiles && pageFiles.length) {
85-
// replace filenames like [...path].vue with ?...path?.vue because [ and ] are reserved in glob matching
86-
rootProjectFiles.push(...pageFiles.map(p => p.replaceAll(/\[(\.+)([^.].*)\]/g, '?$1$2?')))
87-
}
88-
// @ts-expect-error pages can be an object
89-
else if (nuxtOptions.pages !== false && nuxtOptions.pages?.enabled !== false) {
90-
rootProjectFiles.push(withSrcDir(`${nuxtOptions.dir?.pages || 'pages'}/**/*${sfcExtensions}`))
91-
}
83+
if (moduleOptions.experimental?.strictScanContentPaths && pageFiles && pageFiles.length) {
84+
// replace filenames like [...path].vue with ?...path?.vue because [ and ] are reserved in glob matching
85+
if (!isLayer) pagePaths.push(...pageFiles.map(p => p.replaceAll(/\[(\.+)([^.].*)\]/g, '?$1$2?')))
86+
}
87+
// @ts-expect-error pages can be an object
88+
else if (nuxtOptions.pages !== false && nuxtOptions.pages?.enabled !== false) {
89+
pagePaths.push(withSrcDir(`${nuxtOptions.dir?.pages || 'pages'}/**/*${sfcExtensions}`))
9290
}
9391

9492
const componentPaths: string[] = []
@@ -120,7 +118,7 @@ const createInternalContext = async (moduleOptions: ModuleOptions, nuxt = useNux
120118
nuxtOptions.dir?.layouts && withSrcDir(`${nuxtOptions.dir.layouts}/**/*${sfcExtensions}`),
121119
nuxtOptions.dir?.plugins && withSrcDir(`${nuxtOptions.dir.plugins}/**/*${defaultExtensions}`),
122120
...importDirs.map(d => `${d}/**/*${defaultExtensions}`),
123-
...rootProjectFiles,
121+
...pagePaths,
124122

125123
withSrcDir(`{A,a}pp${sfcExtensions}`),
126124
withSrcDir(`{E,e}rror${sfcExtensions}`),

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.