CSS not generated in var a = function a() { ... }
#83
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: webpack 📦
Issue is related to webpack bundler
needs: complete repro 🖥️
Issue need to have complete repro provided
Environment
@linaria/atomic
Description
This is a repost of callstack/linaria#1312
For this code:
css
template string ina()
will be replaced with names, but the CSS rules won't be generated.wyw-in-js/packages/transform/src/utils/getTagProcessor.ts
Lines 371 to 383 in 9a3a33d
parent
is theconst a
node, butpath.scope.getBinding(id.node.name)
returns thefunction a()
node.function a()
node has no references so CSS extraction was skipped.This code is simplified from an output of Solid.js babel plugin, so it can't change.
Reproducible Demo
https://github.com/yume-chan/wyw-css-issue
style.js
exports two functionsa
andb
, both of them generates CSS styles using wyw-in-js.main.js
applies both classes to<h1>
, but onlyb
is effective.The text was updated successfully, but these errors were encountered: