Skip to content

Commit

Permalink
feat: 🎸 disable critical path from the head during generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Reese authored and Nick Reese committed Sep 10, 2020
1 parent 96b0ce4 commit 9af2cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/critical-path-css/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const plugin = {
description: `If a route has a critical path css file it adds it to the cssStack so it is included. Highest priority because css after it will overwrite the critical path css.`,
priority: 100,
run: async ({ plugin, request, cssStack }) => {
if (!plugin.internal.disable) {
if (!plugin.internal.disable && !plugin.config.rebuilding) {
const critCss = plugin.internal.criticalPathCss[request.route];
if (critCss) {
cssStack.push({
Expand Down

0 comments on commit 9af2cb0

Please sign in to comment.