![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
preact-cli-plugin-critical-css
Advanced tools
Preact CLI plugin for adding critical css to your pre-rendered routes
Preact CLI plugin that adds critical css to your pre-rendered routes using html-critical-webpack-plugin.
Install via npm:
npm i -D preact-cli-plugin-critical-css
or yarn:
yarn add preact-cli-plugin-critical-css --dev
then include it in your project by creating a preact.config.js
file:
import criticalCssPlugin from "preact-cli-plugin-critical-css";
export default (config, env) => {
const options = {
// Passed directly to the 'critical' module (this is optional)
};
criticalCssPlugin(config, env, options);
};
The plugin sets some default options which can be overridden:
const defaultOptions = {
// Inline the generated critical-path CSS.
inline: true,
// Minify critical-path CSS when inlining.
minify: true,
// Extract inlined styles from referenced stylesheets.
extract: false,
// Viewport width
width: 1280,
// Viewport height.
height: 600,
// Your build directory to find css files.
base: path.resolve(env.dest),
// The path to a prerendered route. (e.g. index.html)
src: filePath,
// Write the generated critical-path CSS to this file.
dest: filePath
};
Full list of possible options that are passed to critical are available here.
MIT © matthewlynch
FAQs
Preact CLI plugin for adding critical css to your pre-rendered routes
The npm package preact-cli-plugin-critical-css receives a total of 2 weekly downloads. As such, preact-cli-plugin-critical-css popularity was classified as not popular.
We found that preact-cli-plugin-critical-css demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.