Skip to content

Commit

Permalink
chore: fix worker minification (#510)
Browse files Browse the repository at this point in the history
* fix: worker minifation

* Add changeset

---------

Co-authored-by: Puru Vijay <[email protected]>
  • Loading branch information
gtm-nayan and PuruVJ authored Jul 1, 2023
1 parent e0b4f61 commit 371ac4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-tigers-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/repl': patch
---

(fix) Workers minification
2 changes: 1 addition & 1 deletion packages/repl/src/lib/workers/bundler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ self.addEventListener(
// unpkg doesn't set the correct MIME type for .cjs files
// https://github.com/mjackson/unpkg/issues/355
const compiler = await fetch(`${svelte_url}/compiler.cjs`).then((r) => r.text());
eval(compiler);
(0, eval)(compiler);
} else {
try {
importScripts(`${svelte_url}/compiler.js`);
Expand Down
2 changes: 1 addition & 1 deletion packages/repl/src/lib/workers/compiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ self.addEventListener(
// unpkg doesn't set the correct MIME type for .cjs files
// https://github.com/mjackson/unpkg/issues/355
const compiler = await fetch(`${svelte_url}/compiler.cjs`).then((r) => r.text());
eval(compiler);
(0, eval)(compiler);
} else {
try {
importScripts(`${svelte_url}/compiler.js`);
Expand Down

2 comments on commit 371ac4b

@vercel
Copy link

@vercel vercel bot commented on 371ac4b Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hn – ./sites/hn.svelte.dev

hn-svelte.vercel.app
sites-zeta.vercel.app
hn-git-master-svelte.vercel.app
hn.svelte.dev

@vercel
Copy link

@vercel vercel bot commented on 371ac4b Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

repl – ./packages/repl

repl-svelte.vercel.app
svelte-rappel.vercel.app
repl-zeta.vercel.app
repl-git-master-svelte.vercel.app

Please sign in to comment.