@sveltejs/vite-plugin-svelte 2.4.2 → 2.4.4
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/utils/compile.js +1 -1
- package/src/utils/constants.js +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/vite-plugin-svelte",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "dominikg",
|
|
6
6
|
"files": [
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"debug": "^4.3.4",
|
|
38
38
|
"deepmerge": "^4.3.1",
|
|
39
39
|
"kleur": "^4.1.5",
|
|
40
|
-
"magic-string": "^0.30.
|
|
41
|
-
"svelte-hmr": "^0.15.
|
|
40
|
+
"magic-string": "^0.30.2",
|
|
41
|
+
"svelte-hmr": "^0.15.3",
|
|
42
42
|
"vitefu": "^0.2.4",
|
|
43
43
|
"@sveltejs/vite-plugin-svelte-inspector": "^1.0.3"
|
|
44
44
|
},
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/debug": "^4.1.8",
|
|
51
|
-
"esbuild": "^0.18.
|
|
52
|
-
"svelte": "^
|
|
53
|
-
"vite": "^4.
|
|
51
|
+
"esbuild": "^0.18.17",
|
|
52
|
+
"svelte": "^4.1.2",
|
|
53
|
+
"vite": "^4.4.8"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"check:publint": "publint --strict",
|
package/src/utils/compile.js
CHANGED
|
@@ -52,7 +52,7 @@ export const _createCompileSvelte = (makeHot) => {
|
|
|
52
52
|
/** @type {import('../index.d.ts').CompileOptions} */
|
|
53
53
|
const compileOptions = {
|
|
54
54
|
...options.compilerOptions,
|
|
55
|
-
filename
|
|
55
|
+
filename,
|
|
56
56
|
generate: ssr ? 'ssr' : 'dom'
|
|
57
57
|
};
|
|
58
58
|
if (isSvelte3) {
|
package/src/utils/constants.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isSvelte3 } from './svelte-version.js';
|
|
2
|
+
|
|
1
3
|
export const VITE_RESOLVE_MAIN_FIELDS = ['module', 'jsnext:main', 'jsnext'];
|
|
2
4
|
|
|
3
5
|
export const SVELTE_RESOLVE_MAIN_FIELDS = ['svelte'];
|
|
@@ -12,6 +14,10 @@ export const SVELTE_IMPORTS = [
|
|
|
12
14
|
'svelte/transition',
|
|
13
15
|
'svelte'
|
|
14
16
|
];
|
|
17
|
+
// TODO add to global list after dropping svelte 3
|
|
18
|
+
if (!isSvelte3) {
|
|
19
|
+
SVELTE_IMPORTS.push('svelte/internal/disclose-version');
|
|
20
|
+
}
|
|
15
21
|
|
|
16
22
|
export const SVELTE_HMR_IMPORTS = [
|
|
17
23
|
'svelte-hmr/runtime/hot-api-esm.js',
|