Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function create(): Promise<Adapter> {
let done = false;

bundler = new Bundler({
packages_url: 'https://unpkg.com',
packages_url: 'https://cdn.jsdelivr.net/npm',
svelte_version: 'latest',
onstatus(val) {
if (!done && val === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

if (version !== 'local' && !is_pr_or_commit_version) {
$effect(() => {
fetch(`https://unpkg.com/svelte@${version}/package.json`)
fetch(`https://cdn.jsdelivr.net/npm/svelte@${version}/package.json`)
.then((r) => r.json())
.then((pkg) => {
if (pkg.version !== version) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (version !== 'local' && !is_pr_or_commit_version) {
$effect(() => {
fetch(`https://unpkg.com/svelte@${version}/package.json`)
fetch(`https://cdn.jsdelivr.net/npm/svelte@${version}/package.json`)
.then((r) => r.json())
.then((pkg) => {
if (pkg.version !== data.version) {
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/lib/compile-worker/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let inited: PromiseWithResolvers<typeof self.svelte>;
let can_use_experimental_async = false;

async function init(v: string) {
const svelte_url = v === 'local' ? '/svelte' : `https://unpkg.com/svelte@${v}`;
const svelte_url = v === 'local' ? '/svelte' : `https://cdn.jsdelivr.net/npm/svelte@${v}`;
const match = /^(?:pr|commit|branch)-(.+)/.exec(v);

let tarball: FileDescription[] | undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/repl/src/lib/Repl.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

let {
packagesUrl = 'https://unpkg.com',
packagesUrl = 'https://cdn.jsdelivr.net/npm',
svelteVersion = 'latest',
embedded = false,
orientation = 'columns',
Expand Down
2 changes: 1 addition & 1 deletion packages/repl/src/lib/workers/bundler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ async function get_bundle(
if (id === './__entry.js') return;
if (id === 'esm-env') return;
if (id === shared_file) return;
if (id.startsWith('https://unpkg.com/clsx@')) return;
if (id.startsWith('https://cdn.jsdelivr.net/npm/clsx@')) return;

add_tailwind_candidates(this.parse(code));
}
Expand Down