Rollup: doesn't remove linaria from bundle without using plugins, which produces browser error
See original GitHub issueEnvironment
linaria - 1.3.1 rollup - 1.6.0 rollup-plugin-css-only - 1.0.0
Description
When using only css
function with rollup, linaria
is not removed from bundle and is set as a global variable. If you run it, browser will give you an error.
To solve this, currently you need to use rollup-plugin-node-resolve
and rollup-plugin-commonjs
. If linaria will be correctly removed from bundle, this plugins won’t be needed.
Reproducible Demo
Repo - https://github.com/vladshcherbin/experiments/tree/master/linaria-rollup-global
Run: yarn build
I’ve also added pre-built files and build/index.html
file to see error.
Rollup warnings:
Probably related: https://github.com/callstack/linaria/issues/293
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to get rollup to deal with node based libraries in the ...
You should first solve problems in your terminal. Which are like compile errors. Then ones in a browser, which are more like runtime....
Read more >Linaria: Zero-runtime CSS in JS Library - Morioh
Linaria currently supports webpack and Rollup to extract the CSS at build time. To configure your bundler, check the following guides:.
Read more >The ultimate guide to modern web application performance
The following tools are reducing the javascript files size by removing the unnecessary characters, renaming variables or even executing some ...
Read more >Untitled
Estagio no mpf df, First marine division patch stars, Iyarkai mp3 tamil, The savior is ... Debian installer bug report, Use foundation brush...
Read more >@material-ui/lab | Yarn - Package Manager
Material UI v4 doesn't receive active development since September 2021. ... This package hosts the incubator components that are not yet ready to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eemeli solution should be added to docs example because following current example will result in an error.
I’m glad that there is a workaround, we could think of implementing https://github.com/callstack/linaria/issues/293 to solve the issue in it’s source