11import '@sveltejs/site-kit/polyfills' ;
2- import * as tailwindcss from 'tailwindcss' ;
32import { walk } from 'zimmerframe' ;
43import '../patch_window' ;
54import { sleep } from '../../utils' ;
@@ -23,10 +22,6 @@ import type { Node } from 'estree';
2322import { parseTar , type FileDescription } from 'tarparser' ;
2423import { max } from './semver' ;
2524
26- import tailwind_preflight from 'tailwindcss/preflight.css?raw' ;
27- import tailwind_theme from 'tailwindcss/theme.css?raw' ;
28- import tailwind_utilities from 'tailwindcss/utilities.css?raw' ;
29-
3025// hack for magic-string and rollup inline sourcemaps
3126// do not put this into a separate module and import it, would be treeshaken in prod
3227self . window = self ;
@@ -259,6 +254,12 @@ let previous: {
259254let tailwind : Awaited < ReturnType < typeof init_tailwind > > ;
260255
261256async function init_tailwind ( ) {
257+ const tailwindcss = await import ( 'tailwindcss' ) ;
258+
259+ const { default : tailwind_preflight } = await import ( 'tailwindcss/preflight.css?raw' ) ;
260+ const { default : tailwind_theme } = await import ( 'tailwindcss/theme.css?raw' ) ;
261+ const { default : tailwind_utilities } = await import ( 'tailwindcss/utilities.css?raw' ) ;
262+
262263 const tailwind_files : Record < string , string > = {
263264 'tailwindcss/theme.css' : tailwind_theme ,
264265 'tailwindcss/preflight.css' : tailwind_preflight ,
0 commit comments