1
1
import '@sveltejs/site-kit/polyfills' ;
2
- import * as tailwindcss from 'tailwindcss' ;
3
2
import { walk } from 'zimmerframe' ;
4
3
import '../patch_window' ;
5
4
import { sleep } from '../../utils' ;
@@ -23,10 +22,6 @@ import type { Node } from 'estree';
23
22
import { parseTar , type FileDescription } from 'tarparser' ;
24
23
import { max } from './semver' ;
25
24
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
-
30
25
// hack for magic-string and rollup inline sourcemaps
31
26
// do not put this into a separate module and import it, would be treeshaken in prod
32
27
self . window = self ;
@@ -259,6 +254,12 @@ let previous: {
259
254
let tailwind : Awaited < ReturnType < typeof init_tailwind > > ;
260
255
261
256
async 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
+
262
263
const tailwind_files : Record < string , string > = {
263
264
'tailwindcss/theme.css' : tailwind_theme ,
264
265
'tailwindcss/preflight.css' : tailwind_preflight ,
0 commit comments