sygnal 5.3.6 → 5.3.7
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/dist/vite/plugin.cjs.js +13 -6
- package/dist/vite/plugin.mjs +13 -6
- package/package.json +1 -1
- package/src/vite/plugin.ts +13 -4
package/dist/vite/plugin.cjs.js
CHANGED
|
@@ -31,16 +31,23 @@ function sygnal(options = {}) {
|
|
|
31
31
|
name: 'vite-plugin-sygnal',
|
|
32
32
|
config(_config, env) {
|
|
33
33
|
isServe = env.command === 'serve';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const config = {
|
|
35
|
+
// Ensure sygnal is bundled for SSR rather than externalized.
|
|
36
|
+
// Without this, Node fails to resolve sygnal's exports from
|
|
37
|
+
// Vike's server chunks in production builds.
|
|
38
|
+
ssr: {
|
|
39
|
+
noExternal: ['sygnal'],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
if (!disableJsx) {
|
|
43
|
+
config.oxc = {
|
|
38
44
|
jsx: {
|
|
39
45
|
runtime: 'automatic',
|
|
40
46
|
importSource: 'sygnal',
|
|
41
47
|
},
|
|
42
|
-
}
|
|
43
|
-
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return config;
|
|
44
51
|
},
|
|
45
52
|
transform(code, id) {
|
|
46
53
|
if (disableHmr)
|
package/dist/vite/plugin.mjs
CHANGED
|
@@ -29,16 +29,23 @@ function sygnal(options = {}) {
|
|
|
29
29
|
name: 'vite-plugin-sygnal',
|
|
30
30
|
config(_config, env) {
|
|
31
31
|
isServe = env.command === 'serve';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const config = {
|
|
33
|
+
// Ensure sygnal is bundled for SSR rather than externalized.
|
|
34
|
+
// Without this, Node fails to resolve sygnal's exports from
|
|
35
|
+
// Vike's server chunks in production builds.
|
|
36
|
+
ssr: {
|
|
37
|
+
noExternal: ['sygnal'],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
if (!disableJsx) {
|
|
41
|
+
config.oxc = {
|
|
36
42
|
jsx: {
|
|
37
43
|
runtime: 'automatic',
|
|
38
44
|
importSource: 'sygnal',
|
|
39
45
|
},
|
|
40
|
-
}
|
|
41
|
-
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return config;
|
|
42
49
|
},
|
|
43
50
|
transform(code, id) {
|
|
44
51
|
if (disableHmr)
|
package/package.json
CHANGED
package/src/vite/plugin.ts
CHANGED
|
@@ -49,16 +49,25 @@ export default function sygnal(options: SygnalPluginOptions = {}) {
|
|
|
49
49
|
config(_config: any, env: { command: string }) {
|
|
50
50
|
isServe = env.command === 'serve'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
const config: any = {
|
|
53
|
+
// Ensure sygnal is bundled for SSR rather than externalized.
|
|
54
|
+
// Without this, Node fails to resolve sygnal's exports from
|
|
55
|
+
// Vike's server chunks in production builds.
|
|
56
|
+
ssr: {
|
|
57
|
+
noExternal: ['sygnal'],
|
|
58
|
+
},
|
|
59
|
+
}
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
oxc
|
|
61
|
+
if (!disableJsx) {
|
|
62
|
+
config.oxc = {
|
|
56
63
|
jsx: {
|
|
57
64
|
runtime: 'automatic' as const,
|
|
58
65
|
importSource: 'sygnal',
|
|
59
66
|
},
|
|
60
|
-
}
|
|
67
|
+
}
|
|
61
68
|
}
|
|
69
|
+
|
|
70
|
+
return config
|
|
62
71
|
},
|
|
63
72
|
|
|
64
73
|
transform(code: string, id: string) {
|