Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime mode #668

Open
s-panferov opened this issue Aug 29, 2020 · 2 comments
Open

Runtime mode #668

s-panferov opened this issue Aug 29, 2020 · 2 comments
Labels
bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing cat: performance 🚀 Issue is related to performance enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed

Comments

@s-panferov
Copy link
Contributor

s-panferov commented Aug 29, 2020

Describe the enhancement

I would like Linaria to have a "runtime" mode with client-side style compilation like styled-components has. This enables working with esbuild and swc bundlers for development.

Motivation

esbuild and swc are much faster and zero-dependency, so I don't need to have multi-gigabyte node_modules with webpack and babel. I still want to use them for release builds (to precompile and split css files), but I have a separate CI pipeline for that.

Possible implementations

Linaria could have a top-level export like linaria/runtime which I can use as alias to linaria for development builds

@s-panferov s-panferov added the enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed label Aug 29, 2020
@github-actions github-actions bot added cat: performance 🚀 Issue is related to performance cat: modules aliasing 🔗 Issue related to modules aliasing bundler: webpack 📦 Issue is related to webpack bundler labels Aug 29, 2020
@kizu
Copy link

kizu commented Feb 18, 2023

Just want to mention another use-case for the runtime mode — live playgrounds, for example, using in the styleguides for component examples, with editable styles pane for them.

Maybe it could be some kind of an escape hatch, hidden from the regular usage, as I don't think this is something that should be used for the actual production code, so would be better to discourage such usage, but would be awesome to make it available for some of the more specific runtime use-cases.

@snettah
Copy link

snettah commented Mar 11, 2023

No news about that ? I want create an ui lib with linaria to use in Next 13 but I can't due to this error

'Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing cat: performance 🚀 Issue is related to performance enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed
Projects
None yet
Development

No branches or pull requests

3 participants