Skip to content

Router goto-active class does not work with css-module #828

@3cp

Description

@3cp

🐛 Bug Report

When css-module is turned on, the .goto-active css is hashed.

Source css

.goto-active {
  background-color: lightgray; }

Processed css by css-module

._2hWcg4XS-nSqj0MHIpiu3O {
  background-color: lightgray; }

🤔 Expected Behavior

Expect router sends through all the injected css class names (if there are more than just .goto-active) to go through proper css-module handling done by @EisenbergEffect .

😯 Current Behavior

The current behavior is that the injected .goto-active has no idea about css-module, resulting missing applied-style at runtime.

<a goto="welcome" class="au goto-active" href="welcome">Welcome</a>

It should be

<a goto="welcome" class="au _2hWcg4XS-nSqj0MHIpiu3O" href="welcome">Welcome</a>

💁 Possible Solution

Depends on the architecture, this could be a simple fix.

🔦 Context

💻 Code Sample

🌍 Your Environment

Irrevalent

Software Version(s)
Aurelia
Language
Browser
Bundler
Operating System
NPM/Node/Yarn

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions