Skip to content

Commit 99868e0

Browse files
committed
fix, i think
1 parent 23e050d commit 99868e0

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

apps/svelte.dev/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ const config: UserConfig = {
7676
ssr: {
7777
noExternal: ['@sveltejs/site-kit', '@sveltejs/repl'],
7878
external: ['shiki', '@shikijs/twoslash']
79+
},
80+
worker: {
81+
format: 'es'
7982
}
8083
};
8184

packages/editor/src/lib/compile-worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let worker: Worker;
88
let uid = 1;
99

1010
if (BROWSER) {
11-
worker = new Worker(new URL('./worker.ts', import.meta.url), {
11+
worker = new Worker(new URL('./worker', import.meta.url), {
1212
type: 'module'
1313
});
1414

packages/repl/src/lib/Bundler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class Bundler {
2525
this.hash = `${packages_url}:${svelte_version}`;
2626

2727
if (!workers.has(this.hash)) {
28-
const worker = new Worker(new URL('./workers/bundler/index.ts', import.meta.url), {
28+
const worker = new Worker(new URL('./workers/bundler/index', import.meta.url), {
2929
type: 'module'
3030
});
3131

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import '@sveltejs/site-kit/polyfills';
2-
import * as tailwindcss from 'tailwindcss';
32
import { walk } from 'zimmerframe';
43
import '../patch_window';
54
import { sleep } from '../../utils';
@@ -23,10 +22,6 @@ import type { Node } from 'estree';
2322
import { parseTar, type FileDescription } from 'tarparser';
2423
import { 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
3227
self.window = self;
@@ -259,6 +254,12 @@ let previous: {
259254
let tailwind: Awaited<ReturnType<typeof init_tailwind>>;
260255

261256
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+
262263
const tailwind_files: Record<string, string> = {
263264
'tailwindcss/theme.css': tailwind_theme,
264265
'tailwindcss/preflight.css': tailwind_preflight,

packages/site-kit/src/lib/search/SearchBox.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
3636
const pending = new Set();
3737
3838
onMount(async () => {
39-
worker = new Worker(new URL('./search-worker.ts', import.meta.url), {
39+
worker = new Worker(new URL('./search-worker', import.meta.url), {
4040
type: 'module'
4141
});
4242

0 commit comments

Comments
 (0)