Je Xia
Je Xia
@shadowtime2000 cool, we need to parse the css to ast, then match it with the jsx tree to implement the scope inject and tree shaking, and yes include the minification...
some refs: - https://github.com/swc-project/swc/pull/950 - https://github.com/servo/rust-cssparser - https://github.com/connorskees/grass
@shadowtime2000 better not, should use `import` syntax: ``` import Button form "./button.alef" ```
in `production` mode, output will be minified including CSS
how about this: ```tsx $: (el) => { const members = el.querySelectorAll("[class='member']"); members.forEach(member => member.textContent += " Member"); } ```
since the **side effect** will be triggered(asynchronously) after dom mounted, that can get the container element very easy.
@shadowtime2000 but if we have multiple `$t` or conditional expr, that can not work...
@shadowtime2000 that makes sense!
@shadowtime2000 the output of styles will be: ```js let n = 0 const $style_frag = id => ` /* unused h1 */ /* h1 { font-size: 200%; } */ p.${id}...
@shadowtime2000 please check #5, we will support **precompile** that can preprocess `$style:` section.