Skip to content

Commit bc871a3

Browse files
committed
chore: add warning log and changeset for experimental support
1 parent bd80911 commit bc871a3

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.changeset/huge-lamps-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/vite-plugin-svelte': minor
3+
---
4+
5+
Add experimental support for rolldown-vite

packages/vite-plugin-svelte/src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ import { VitePluginSvelteCache } from './utils/vite-plugin-svelte-cache.js';
2626
import { loadRaw } from './utils/load-raw.js';
2727
import * as svelteCompiler from 'svelte/compiler';
2828
import { SVELTE_VIRTUAL_STYLE_ID_REGEX } from './utils/constants.js';
29+
import * as vite from 'vite';
30+
// @ts-expect-error rolldownVersion
31+
const { version: viteVersion, rolldownVersion } = vite;
2932

3033
/**
3134
* @param {Partial<import('./public.d.ts').Options>} [inlineOptions]
@@ -35,6 +38,13 @@ export function svelte(inlineOptions) {
3538
if (process.env.DEBUG != null) {
3639
log.setLevel('debug');
3740
}
41+
if (rolldownVersion) {
42+
log.warn.once('!!! Support for rolldown-vite in vite-plugin-svelte is experimental !!!', {
43+
rolldownVersion,
44+
viteVersion
45+
});
46+
}
47+
3848
validateInlineOptions(inlineOptions);
3949
const cache = new VitePluginSvelteCache();
4050
// updated in configResolved hook

packages/vite-plugin-svelte/types/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
null,
2727
null
2828
],
29-
"mappings": ";;;;aAIYA,OAAOA;;WAETC,mBAAmBA;;;;;;;;;;;kBAWZC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgGbC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiDnBC,mBAAmBA;;;;;;;;;;;;;;;;WAgBnBC,oBAAoBA;;;;;;;;;;;;;;;MAezBC,SAASA;;kBAEGC,qBAAqBA;;;;;;;;;;;;;iBClKtBC,MAAMA;iBCRNC,cAAcA;iBCORC,gBAAgBA",
29+
"mappings": ";;;;aAIYA,OAAOA;;WAETC,mBAAmBA;;;;;;;;;;;kBAWZC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgGbC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiDnBC,mBAAmBA;;;;;;;;;;;;;;;;WAgBnBC,oBAAoBA;;;;;;;;;;;;;;;MAezBC,SAASA;;kBAEGC,qBAAqBA;;;;;;;;;;;;;iBC/JtBC,MAAMA;iBCXNC,cAAcA;iBCORC,gBAAgBA",
3030
"ignoreList": []
3131
}

0 commit comments

Comments
 (0)