v23 doesn't replace multiple invalid {css.key} entries
Closed this issue · 0 comments
tivac commented
Expected Behavior
If there's more than one {css.key}
value that doesn't exist they should be replaced
Current Behavior
Only the first is replaced
Possible Solution
modular-css/packages/svelte/svelte.js
Line 48 in 0fc5403
Needs to have the g
flag set so it can match multiple times.
Steps to Reproduce (for bugs)
- Create a template with multiple
<div class="{css.key}" />
entries wherekey
is different each time - Run it
- Notice that only the first has been updated
Context
Trying to add new components and rough-in classnames still causes JS explosions
Your Environment
Executable | Version |
---|---|
modular-css |
v23.0.0 |
npm --version |
6.9.0 |
node --version |
10.12.0 |