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

perf: if defined, use rootDir #125

Closed
wants to merge 1 commit into from
Closed

perf: if defined, use rootDir #125

wants to merge 1 commit into from

Conversation

mrazauskas
Copy link

If rootDir is defined, we can simply use that value.

(Also it seems like after #107 was merged, line 51 is unreachable.)

configFile: options.configFile,
configOverrides: options.config
})

if (!options.config.rootDir) {
options.config.rootDir = options.rootDir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.rootDir is passed to nuxt (core) config. options is for test-utils context.

@@ -38,22 +37,18 @@ const resolveRootDir = () => {
export async function loadFixture () {
const { options } = getContext()

options.rootDir = resolveRootDir()
const rootDir = options.rootDir || resolveRootDir()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still should warn users if rootDir is not a valid nuxt app. What's the point of this change?

@mrazauskas
Copy link
Author

Apologies this was messy PR. Found better solution.

@mrazauskas mrazauskas closed this May 19, 2021
@mrazauskas mrazauskas deleted the use-root-dir branch May 19, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants