diff --git a/lib/blocks/script.js b/lib/blocks/script.js index 8d00042b..911233be 100644 --- a/lib/blocks/script.js +++ b/lib/blocks/script.js @@ -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);