Skip to content

Commit

Permalink
fixup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Aug 2, 2024
1 parent 507ff2b commit c523578
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/cli/src/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ function greenwoodSyncImportAttributes(compilation) {
if (!preBundled) {
const sourceURL = new URL(value, compilation.context.projectDirectory);
// inline global assets may already be optimized, check for those first
// TODO we should probably bundling one-offs, but how to handle when all plugins are async?
const source = compilation.resources.get(sourceURL.pathname)?.optimizedFileContents
? compilation.resources.get(sourceURL.pathname).optimizedFileContents
: fs.readFileSync(sourceURL, 'utf-8');
Expand Down Expand Up @@ -528,7 +527,7 @@ function greenwoodSyncImportAttributes(compilation) {
});

// have to apply Greenwood's optimizing here instead of in generateBundle
// since we can't do async work inside a async AST operation
// since we can't do async work inside a sync AST operation
if (!asset.preBundled) {
const assetUrl = unbundledAssetsRefMapper[asset].sourceURL;
const request = new Request(assetUrl, { headers: { 'Content-Type': 'text/css' } });
Expand Down

0 comments on commit c523578

Please sign in to comment.