@sveltejs/vite-plugin-svelte 6.2.1 → 6.2.2
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.2.
|
|
3
|
+
"version": "6.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "dominikg",
|
|
6
6
|
"files": [
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@sveltejs/vite-plugin-svelte-inspector": "^5.0.0",
|
|
38
|
-
"debug": "^4.4.1",
|
|
39
38
|
"deepmerge": "^4.3.1",
|
|
40
|
-
"magic-string": "^0.30.
|
|
39
|
+
"magic-string": "^0.30.21",
|
|
40
|
+
"obug": "^2.1.0",
|
|
41
41
|
"vitefu": "^1.1.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/debug": "^4.1.12",
|
|
49
|
-
"sass": "^1.
|
|
50
|
-
"svelte": "^5.
|
|
51
|
-
"vite": "^7.
|
|
49
|
+
"sass": "^1.94.2",
|
|
50
|
+
"svelte": "^5.45.4",
|
|
51
|
+
"vite": "^7.2.6"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"check:publint": "publint --strict",
|
package/src/plugins/configure.js
CHANGED
|
@@ -24,7 +24,7 @@ const { version: viteVersion, rolldownVersion } = vite;
|
|
|
24
24
|
export function configure(api, inlineOptions) {
|
|
25
25
|
if (rolldownVersion) {
|
|
26
26
|
log.warn.once(
|
|
27
|
-
`!!! Support for
|
|
27
|
+
`!!! Support for vite 8 beta in vite-plugin-svelte is experimental (rolldown: ${rolldownVersion}, vite: ${viteVersion}) !!!
|
|
28
28
|
See https://github.com/sveltejs/vite-plugin-svelte/issues/1143 for a list of known issues and to report feedback.`.replace(
|
|
29
29
|
/\t+/g,
|
|
30
30
|
'\t'
|
|
@@ -43,7 +43,7 @@ export function setupOptimizer(api) {
|
|
|
43
43
|
// the added plugins are patched in configResolved below
|
|
44
44
|
if (rolldownVersion) {
|
|
45
45
|
//@ts-ignore rolldown types not finished
|
|
46
|
-
optimizeDeps.
|
|
46
|
+
optimizeDeps.rolldownOptions = {
|
|
47
47
|
plugins: [
|
|
48
48
|
placeholderRolldownOptimizerPlugin(optimizeSveltePluginName),
|
|
49
49
|
placeholderRolldownOptimizerPlugin(optimizeSvelteModulePluginName)
|
|
@@ -65,7 +65,7 @@ export function setupOptimizer(api) {
|
|
|
65
65
|
if (rolldownVersion) {
|
|
66
66
|
const plugins =
|
|
67
67
|
// @ts-expect-error not typed
|
|
68
|
-
optimizeDeps.
|
|
68
|
+
optimizeDeps.rolldownOptions?.plugins?.filter((p) =>
|
|
69
69
|
[optimizeSveltePluginName, optimizeSvelteModulePluginName].includes(p.name)
|
|
70
70
|
) ?? [];
|
|
71
71
|
for (const plugin of plugins) {
|
package/src/types/compile.d.ts
CHANGED
package/src/utils/log.js
CHANGED
|
@@ -6,7 +6,7 @@ const cyan = (/** @type {string} */ txt) => styleText('cyan', txt);
|
|
|
6
6
|
const yellow = (/** @type {string} */ txt) => styleText('yellow', txt);
|
|
7
7
|
const red = (/** @type {string} */ txt) => styleText('red', txt);
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import { createDebug, enabled } from 'obug';
|
|
10
10
|
|
|
11
11
|
/** @type {import('../types/log.d.ts').LogLevel[]} */
|
|
12
12
|
const levels = ['debug', 'info', 'warn', 'error', 'silent'];
|
|
@@ -14,7 +14,7 @@ const prefix = 'vite-plugin-svelte';
|
|
|
14
14
|
/** @type {Record<import('../types/log.d.ts').LogLevel, any>} */
|
|
15
15
|
const loggers = {
|
|
16
16
|
debug: {
|
|
17
|
-
log:
|
|
17
|
+
log: createDebug(`${prefix}`),
|
|
18
18
|
enabled: false,
|
|
19
19
|
isDebug: true
|
|
20
20
|
},
|
|
@@ -252,5 +252,5 @@ export function buildExtendedLogMessage(w) {
|
|
|
252
252
|
* @returns {boolean}
|
|
253
253
|
*/
|
|
254
254
|
export function isDebugNamespaceEnabled(namespace) {
|
|
255
|
-
return
|
|
255
|
+
return enabled(`${prefix}:${namespace}`);
|
|
256
256
|
}
|
package/src/utils/options.js
CHANGED
|
@@ -423,9 +423,9 @@ function validateViteConfig(extraViteConfig, config, options) {
|
|
|
423
423
|
if (rolldownVersion && isBuild) {
|
|
424
424
|
// read user config inlineConst value
|
|
425
425
|
const inlineConst =
|
|
426
|
-
//@ts-ignore optimization only exists in
|
|
426
|
+
//@ts-ignore optimization only exists in vite-8 beta
|
|
427
427
|
config.build?.rolldownOptions?.optimization?.inlineConst ??
|
|
428
|
-
//@ts-ignore optimization only exists in
|
|
428
|
+
//@ts-ignore optimization only exists in vite-8 beta
|
|
429
429
|
config.build?.rollupOptions?.optimization?.inlineConst;
|
|
430
430
|
|
|
431
431
|
if (inlineConst === false) {
|