abvanton200 / critical-css-parser Goto Github PK
View Code? Open in Web Editor NEWGet critical (above-the-fold) and the rest CSS using Puppeteer
License: MIT License
Get critical (above-the-fold) and the rest CSS using Puppeteer
License: MIT License
Any tips on configuring linting rules in this bad boy? dropcss.cs.js throws error around this line:
'var TAG_OPEN = 1;'
error:
if (VOIDS.has(tag) || m2[1] == "/>")
TypeError: Cannot read property '1' of null
at next (.....\node_modules\dropcss\dist\dropcss.cjs.js:70:28)
at tokenize (.....\node_modules\dropcss\dist\dropcss.cjs.js:87:3)
at export_parse .....\node_modules\dropcss\dist\dropcss.cjs.js:195:15)
at dropcss (.....\node_modules\dropcss\dist\dropcss.cjs.js:969:10)
at n (.....\node_modules\critical-css-parser\dist\index.modern.js:1:2055)
at module.exports (.....\node_modules\critical-css-parser\dist\index.modern.js:1:3197)
at async module.exports (.....\node_modules\critical-css-inliner\dist\index.modern.js:1:512)
at async .\critical_css_inliner.js:5:3
'critical_css_inliner.js is script it's running from, same error with critical-css-parser and critical_css_inliner
#card {
position: absolute;
top: 1000%;
}
this will probably remove this #card
element, then drop its CSS and on the real page it will now (wrongly) appear above the fold.
i can't think of a solution to this. but you may want to mention that stuff like this can happen if elements are moved below the fold by css only.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.