Skip to content

Commit

Permalink
refactor(nuxt): hardcode sep character
Browse files Browse the repository at this point in the history
  • Loading branch information
IonianPlayboy committed Mar 18, 2024
1 parent 439d0e6 commit 18c37fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/core/nuxt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dirname, join, normalize, relative, resolve, sep } from 'pathe'
import { dirname, join, normalize, relative, resolve } from 'pathe'
import { createDebugger, createHooks } from 'hookable'
import type { LoadNuxtOptions } from '@nuxt/kit'
import { addBuildPlugin, addComponent, addPlugin, addRouteMiddleware, addServerPlugin, addTemplate, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtCtx, resolveAlias, resolveFiles, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit'
Expand Down Expand Up @@ -207,7 +207,7 @@ async function initNuxt (nuxt: Nuxt) {
// Exclude top-level resolutions by plugins
join(nuxt.options.rootDir, 'index.html'),
// Keep only imports coming from the user's project (inside the rootDir)
new RegExp(`^(?!${escapeRE(nuxt.options.rootDir)}${escapeRE(sep)}).+[^\n]+$`)
new RegExp(`^(?!${escapeRE(nuxt.options.rootDir)}/).+[^\n]+$`)
],
detectedComponents
}
Expand Down

0 comments on commit 18c37fb

Please sign in to comment.