Skip to content

Inject variable into JavaScript #172

Open
@mrleblanc101

Description

@mrleblanc101

Hi,
Since this is executed during build and not at runtime, would it be possible to inject the variable into the Nuxt $config object or maybe create a new $theme or $styleRessources object ?
Some Vue component require a color as a props and I don't want to duplicate the data as it make the app harder to maintain.

So for example:

<SomeDummyComponent :color="#ff00ff" />

Would become

<SomeDummyComponent :color="$styleRessource.colorPrimary" />

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