Skip to content

Commit

Permalink
Revert "fix: inline entry css if modern bundle is skipped"
Browse files Browse the repository at this point in the history
This reverts commit 2e63b8a.
  • Loading branch information
lsdsjy committed Nov 21, 2022
1 parent 2e63b8a commit 92278ef
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/plugin-legacy/src/index.ts
Expand Up @@ -352,17 +352,6 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
}
},

renderStart(opts) {
// @ts-ignore
// In the `renderChunk` hook,
// we skip inlining CSS for the entry chunk because a separate CSS file
// would've been already linked in index.html (see #9761).
// But if `genModern` is set to false, the CSS still should be inlined.
// If in the future vite doesn't inline CSS any more (as #9920 suggests),
// this flag can be safely deleted.
opts.__vite_inline_entry_css__ = !genModern
},

async renderChunk(raw, chunk, opts) {
if (config.build.ssr) {
return null
Expand Down

0 comments on commit 92278ef

Please sign in to comment.