@sveltejs/vite-plugin-svelte 6.1.2 → 6.1.3
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/vite-plugin-svelte",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "dominikg",
|
|
6
6
|
"files": [
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/debug": "^4.1.12",
|
|
50
50
|
"sass": "^1.90.0",
|
|
51
|
-
"svelte": "^5.38.
|
|
52
|
-
"vite": "^7.1.
|
|
51
|
+
"svelte": "^5.38.2",
|
|
52
|
+
"vite": "^7.1.2"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"check:publint": "publint --strict",
|
package/src/plugins/compile.js
CHANGED
|
@@ -20,7 +20,7 @@ export function compile(api) {
|
|
|
20
20
|
name: 'vite-plugin-svelte:compile',
|
|
21
21
|
configResolved() {
|
|
22
22
|
//@ts-expect-error defined below but filter not in type
|
|
23
|
-
plugin.transform.filter = api.
|
|
23
|
+
plugin.transform.filter = api.filter;
|
|
24
24
|
options = api.options;
|
|
25
25
|
compileSvelte = api.compileSvelte;
|
|
26
26
|
},
|
package/src/plugins/configure.js
CHANGED
|
@@ -71,8 +71,8 @@ export function configure(api, inlineOptions) {
|
|
|
71
71
|
api.options.stats = new VitePluginSvelteStats();
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
api.
|
|
75
|
-
|
|
74
|
+
api.filter = buildIdFilter(options);
|
|
75
|
+
api.idFilter = api.filter;
|
|
76
76
|
api.idParser = buildIdParser(options);
|
|
77
77
|
api.compileSvelte = createCompileSvelte();
|
|
78
78
|
log.debug('resolved options', api.options, 'config');
|
|
@@ -34,12 +34,12 @@ export function hotUpdate(api) {
|
|
|
34
34
|
plugin.transform.filter = {
|
|
35
35
|
id: {
|
|
36
36
|
// reinclude virtual styles to get their output
|
|
37
|
-
include: [...api.
|
|
37
|
+
include: [...api.filter.id.include, SVELTE_VIRTUAL_STYLE_ID_REGEX],
|
|
38
38
|
exclude: [
|
|
39
39
|
// ignore files in node_modules, we don't hot update them
|
|
40
40
|
/\/node_modules\//,
|
|
41
41
|
// remove style exclusion
|
|
42
|
-
...api.
|
|
42
|
+
...api.filter.id.exclude.filter((filter) => filter !== SVELTE_VIRTUAL_STYLE_ID_REGEX)
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -15,7 +15,7 @@ export function loadCustom(api) {
|
|
|
15
15
|
enforce: 'pre', // must come before vites own asset handling or custom extensions like .svg won't work
|
|
16
16
|
configResolved() {
|
|
17
17
|
//@ts-expect-error load defined below but filter not in type
|
|
18
|
-
plugin.load.filter = api.
|
|
18
|
+
plugin.load.filter = api.filter;
|
|
19
19
|
},
|
|
20
20
|
|
|
21
21
|
load: {
|
|
@@ -32,7 +32,7 @@ export function preprocess(api) {
|
|
|
32
32
|
enforce: 'pre',
|
|
33
33
|
configResolved(c) {
|
|
34
34
|
//@ts-expect-error defined below but filter not in type
|
|
35
|
-
plugin.transform.filter = api.
|
|
35
|
+
plugin.transform.filter = api.filter;
|
|
36
36
|
options = api.options;
|
|
37
37
|
if (arraify(options.preprocess).length > 0) {
|
|
38
38
|
preprocessSvelte = createPreprocessSvelte(options, c);
|
|
@@ -4,7 +4,12 @@ import type { CompileSvelte } from './compile.d.ts';
|
|
|
4
4
|
|
|
5
5
|
export interface PluginAPI {
|
|
6
6
|
options: ResolvedOptions;
|
|
7
|
-
|
|
7
|
+
filter: IdFilter;
|
|
8
8
|
idParser: IdParser;
|
|
9
9
|
compileSvelte: CompileSvelte;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated use 'filter' instead
|
|
12
|
+
* // TODO remove in next major
|
|
13
|
+
*/
|
|
14
|
+
idFilter: IdFilter;
|
|
10
15
|
}
|