Skip to content

import.meta.dirname breaks compatibility with Bazel #403

@Aghassi

Description

@Aghassi

const themeStyles = resolve(import.meta.dirname, '../.vocs/theme.css')

This sort of intermediate artifact writing breaks compatibility with build tools like Bazel because it attempts to write these files into node_modules which are readonly under the Bazel sandbox (therefore not modifiable). To make this more supported, this sort of logic should be a command that you can run as a precompile step that produces this output which you then pass to this build tool. This allows the consumer of this tool to run the command under the Bazel graph, produce an artifact, and pass that artifact to the build command without writing to readonly areas on disk.

Would you consider adding a command to generate what is needed from this sort of logic and have a document about running it before running the build for those of us who need this capability?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions