Skip to content

Commit

Permalink
fix(develop): add blank .css to ensure mini-css-extract-plugin always…
Browse files Browse the repository at this point in the history
… has something to extract (#29681)
  • Loading branch information
pieh authored Feb 22, 2021
1 parent 797e7f4 commit 5de8562
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/gatsby/cache-dir/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import asyncRequires from "$virtual/async-requires"
// Generated during bootstrap
import matchPaths from "$virtual/match-paths.json"

// ensure in develop we have at least some .css (even if it's empty).
// this is so there is no warning about not matching content-type when site doesn't include any regular css (for example when css-in-js is used)
// this also make sure that if all css is removed in develop we are not left with stale commons.css that have stale content
import "./blank.css"

// Enable fast-refresh for virtual sync-requires
module.hot.accept(`$virtual/async-requires`, () => {
// Manually reload
Expand Down
Empty file.

0 comments on commit 5de8562

Please sign in to comment.