Skip to content
This repository was archived by the owner on Oct 17, 2020. It is now read-only.
This repository was archived by the owner on Oct 17, 2020. It is now read-only.

Make css-loader use "preload" when available #631

@wincent

Description

@wincent

In service of LPS-115876, the idea is to have the css-loader emit:

<link as="style" rel="preload" />

tags instead of:

<link rel="stylesheet" />

ones.

As noted here:

On top of that, preload does not block the window’s onload event, unless the resource is also requested by a resource that blocks that event.

In practice, we don't expect this to make page loads perceptibly faster, but it should at least avoid Lighthouse reporting onload events as delayed.

Related community Slack discussion: https://liferay-community.slack.com/archives/CB2QQ3M5F/p1598598237007500

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions