@sveltejs/vite-plugin-svelte 4.0.0-next.8 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/public.d.ts +3 -3
- package/src/utils/id.js +2 -10
- package/types/index.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/vite-plugin-svelte",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "dominikg",
|
|
6
6
|
"files": [
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"debug": "^4.3.7",
|
|
41
41
|
"deepmerge": "^4.3.1",
|
|
42
42
|
"kleur": "^4.1.5",
|
|
43
|
-
"magic-string": "^0.30.
|
|
44
|
-
"vitefu": "^1.0.
|
|
43
|
+
"magic-string": "^0.30.12",
|
|
44
|
+
"vitefu": "^1.0.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"svelte": "^5.0.0-next.96 || ^5.0.0",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/debug": "^4.1.12",
|
|
52
52
|
"esbuild": "^0.24.0",
|
|
53
|
-
"sass": "^1.
|
|
54
|
-
"svelte": "^5.
|
|
55
|
-
"vite": "^5.4.
|
|
53
|
+
"sass": "^1.81.0",
|
|
54
|
+
"svelte": "^5.2.0",
|
|
55
|
+
"vite": "^5.4.11"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"check:publint": "publint --strict",
|
package/src/public.d.ts
CHANGED
|
@@ -92,9 +92,9 @@ export interface PluginOptions {
|
|
|
92
92
|
* @example
|
|
93
93
|
* ```
|
|
94
94
|
* ({ filename, compileOptions }) => {
|
|
95
|
-
* // Dynamically set
|
|
96
|
-
* if (
|
|
97
|
-
* return {
|
|
95
|
+
* // Dynamically set runes mode per Svelte file
|
|
96
|
+
* if (forceRunesMode(filename) && !compileOptions.runes) {
|
|
97
|
+
* return { runes: true };
|
|
98
98
|
* }
|
|
99
99
|
* }
|
|
100
100
|
* ```
|
package/src/utils/id.js
CHANGED
|
@@ -8,15 +8,7 @@ import { DEFAULT_SVELTE_MODULE_EXT, DEFAULT_SVELTE_MODULE_INFIX } from './consta
|
|
|
8
8
|
const VITE_FS_PREFIX = '/@fs/';
|
|
9
9
|
const IS_WINDOWS = process.platform === 'win32';
|
|
10
10
|
|
|
11
|
-
const SUPPORTED_COMPILER_OPTIONS = [
|
|
12
|
-
'generate',
|
|
13
|
-
'dev',
|
|
14
|
-
'css',
|
|
15
|
-
'hydratable',
|
|
16
|
-
'customElement',
|
|
17
|
-
'immutable',
|
|
18
|
-
'enableSourcemap'
|
|
19
|
-
];
|
|
11
|
+
const SUPPORTED_COMPILER_OPTIONS = ['generate', 'dev', 'css', 'customElement', 'immutable'];
|
|
20
12
|
const TYPES_WITH_COMPILER_OPTIONS = ['style', 'script', 'all'];
|
|
21
13
|
|
|
22
14
|
/**
|
|
@@ -102,7 +94,7 @@ function parseRequestQuery(rawQuery) {
|
|
|
102
94
|
throw new Error(
|
|
103
95
|
`Invalid compilerOptions in query ${rawQuery}. CompilerOptions are only supported for raw or direct queries with type in "${TYPES_WITH_COMPILER_OPTIONS.join(
|
|
104
96
|
', '
|
|
105
|
-
)}" e.g. '?svelte&raw&type=script&compilerOptions={"generate":"
|
|
97
|
+
)}" e.g. '?svelte&raw&type=script&compilerOptions={"generate":"server","dev":false}`
|
|
106
98
|
);
|
|
107
99
|
}
|
|
108
100
|
try {
|
package/types/index.d.ts
CHANGED
|
@@ -92,9 +92,9 @@ declare module '@sveltejs/vite-plugin-svelte' {
|
|
|
92
92
|
* @example
|
|
93
93
|
* ```
|
|
94
94
|
* ({ filename, compileOptions }) => {
|
|
95
|
-
* // Dynamically set
|
|
96
|
-
* if (
|
|
97
|
-
* return {
|
|
95
|
+
* // Dynamically set runes mode per Svelte file
|
|
96
|
+
* if (forceRunesMode(filename) && !compileOptions.runes) {
|
|
97
|
+
* return { runes: true };
|
|
98
98
|
* }
|
|
99
99
|
* }
|
|
100
100
|
* ```
|