Skip to content

Commit

Permalink
move entry types
Browse files Browse the repository at this point in the history
  • Loading branch information
cjtantay committed Nov 5, 2024
1 parent 0cc082b commit 7bb0a4b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/blocks/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ import debug from 'debug';
import { getStaticPathFromManifestEntry } from './static.js';

const logger = debug('baker:blocks:script');
const EntryTypes = {
CSS: 'css',
MODERN: 'modern',
LEGACY: 'legacy',
};

export function createScriptBlock(rollup) {
return function script(entry, shouldPreload = false) {
const { manifest } = rollup;
const { preloads } = manifest;

const EntryTypes = {
CSS: 'css',
MODERN: 'modern',
LEGACY: 'legacy',
};

const cssEntry = rollup.getManifestEntryByType(entry, EntryTypes.CSS);
const modernEntry = rollup.getManifestEntryByType(entry, EntryTypes.MODERN);
const legacyEntry = rollup.getManifestEntryByType(entry, EntryTypes.LEGACY);
Expand Down

0 comments on commit 7bb0a4b

Please sign in to comment.