Skip to content

[6.12] Module suppresses errors for Nuxt templates #860

@ineshbose

Description

@ineshbose

Environment

any

Reproduction

No response

Describe the bug

This is the catch-block for when loading a config file:

tailwindcss/src/context.ts

Lines 128 to 134 in a0d7599

if (!configPath.startsWith(nuxt.options.buildDir)) {
configUpdatedHook[configPath] = 'return {};'
logger.warn(`Failed to load Tailwind config at: \`./${relative(nuxt.options.rootDir, configPath)}\``, e)
}
else {
configUpdatedHook[configPath] = nuxt.options.dev ? 'return {};' : ''
}

some configs are Nuxt templates (which may not be written to the filesystem yet without prepare), so we want to suppress those errors, but any other errors like syntax, module not found, etc tend to get ignored as well. This bit just needs some refactoring with the stricter conditions using the error e message/code.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions