Comments (5)
True.
Netlify builds seems to crash randomly and not because of the plugin.
Thanks for your time.
from netlify-plugin-inline-critical-css.
Hi. Iād need more info or an example site to understand the problem. critical
already uses this media switching strategy for your non-inlined styles, you shouldn't have to implement it yourself? You may also need to know about netlify/build#1384.
from netlify-plugin-inline-critical-css.
Hi, thanks for your reply.
I don't use any Netlify optimization.
When I switch from
<link rel=stylesheet href=style.min.css
to
<link rel=stylesheet href=style.min.css media=print onload="this.media='all'"
plugin doesn't detect my stylesheet and therefore doesn't inline critical styles.
This <link rel=stylesheet href=style.min.css media=print onload="this.media='all'"
is a smart way to defer CSS loading for performances.
Thanks for your time.
Best,
from netlify-plugin-inline-critical-css.
critical
should be applying this strategy for your non-inlined styles already, you should double check, you may not need to do this yourself.
Iām pretty sure critical
will ignore media="print"
stylesheets while parsing your HTML, see https://github.com/addyosmani/critical/blob/6b3e957ee2081dccb7113f23f4d648142687ef53/src/file.js#L376.
Closing, feel free to open an issue on https://github.com/addyosmani/critical if you think something is worth changing/fixing.
from netlify-plugin-inline-critical-css.
Sorry to be back.
Remade a commit with my stylesheet optimization only:
<link rel=stylesheet href=style.min.css media=print onload="this.media='all'">
Netlify sent me this:
(netlify-plugin-inline-critical-css onPostBuild completed in 6.5s)
The only <style> tag in my header was my @font-face declaration.
Reverted to
<link rel=stylesheet href=style.min.css>
and CSS inling is back.
from netlify-plugin-inline-critical-css.
Related Issues (20)
- Parallelize execution directly via `critical`
- EISDIR: illegal operation on a directory, read HOT 3
- `ENOENT` error when deleting a file
- Site is first showing content without css HOT 5
- Not all pages get inline critical css
- Plugin error not telling me where the error was HOT 1
- Plugin "netlify-plugin-inline-critical-css" failed: Failed to launch the browser process! HOT 2
- "unknown rule" with prism.css HOT 2
- Debugging help - file not found style.css, but not referenced in my site HOT 3
- postcss-discard: postcss.plugin was deprecated HOT 3
- Resolve it's own dependencies HOT 1
- Plugin removes inline JavaScript from <head> HOT 1
- Failing on page with large json schema HOT 3
- SyntaxError: 'noscript)>[rel="stylesheet"]' is not a valid selector HOT 8
- Lingering puppeteer processes cause penthouse to timeout and build to fail HOT 11
- Error `Cannot read property 'clear' of undefined` HOT 7
- Error `Cannot read property 'walkDecls' of undefined` HOT 3
- `src and type required ` HOT 4
- `Failed to launch chrome` error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netlify-plugin-inline-critical-css.