vike 0.4.238-commit-4c6aa0d → 0.4.238-commit-d48a597
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/cjs/node/vite/plugins/pluginNonRunnableDev.js +4 -3
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/node/vite/plugins/pluginNonRunnableDev.js +4 -3
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/package.json +1 -1
|
@@ -34,15 +34,16 @@ function pluginNonRunnableDev() {
|
|
|
34
34
|
transform(code, id) {
|
|
35
35
|
if (!config._isDev)
|
|
36
36
|
return;
|
|
37
|
-
|
|
37
|
+
const idWithoutQuery = id.split('?')[0];
|
|
38
|
+
if (idWithoutQuery !== distFileIsNonRunnableDev && idWithoutQuery !== distFileGlobalContext)
|
|
38
39
|
return;
|
|
39
40
|
if ((0, utils_js_1.isRunnableDevEnvironment)(this.environment))
|
|
40
41
|
return;
|
|
41
42
|
const { magicString, getMagicStringResult } = (0, getMagicString_js_1.getMagicString)(code, id);
|
|
42
|
-
if (
|
|
43
|
+
if (idWithoutQuery === distFileIsNonRunnableDev) {
|
|
43
44
|
magicString.replaceAll('__VIKE__IS_NON_RUNNABLE_DEV', JSON.stringify(true));
|
|
44
45
|
}
|
|
45
|
-
if (
|
|
46
|
+
if (idWithoutQuery === distFileGlobalContext) {
|
|
46
47
|
magicString.replaceAll('__VIKE__DYNAMIC_IMPORT', 'import');
|
|
47
48
|
}
|
|
48
49
|
return getMagicStringResult();
|
|
@@ -32,15 +32,16 @@ function pluginNonRunnableDev() {
|
|
|
32
32
|
transform(code, id) {
|
|
33
33
|
if (!config._isDev)
|
|
34
34
|
return;
|
|
35
|
-
|
|
35
|
+
const idWithoutQuery = id.split('?')[0];
|
|
36
|
+
if (idWithoutQuery !== distFileIsNonRunnableDev && idWithoutQuery !== distFileGlobalContext)
|
|
36
37
|
return;
|
|
37
38
|
if (isRunnableDevEnvironment(this.environment))
|
|
38
39
|
return;
|
|
39
40
|
const { magicString, getMagicStringResult } = getMagicString(code, id);
|
|
40
|
-
if (
|
|
41
|
+
if (idWithoutQuery === distFileIsNonRunnableDev) {
|
|
41
42
|
magicString.replaceAll('__VIKE__IS_NON_RUNNABLE_DEV', JSON.stringify(true));
|
|
42
43
|
}
|
|
43
|
-
if (
|
|
44
|
+
if (idWithoutQuery === distFileGlobalContext) {
|
|
44
45
|
magicString.replaceAll('__VIKE__DYNAMIC_IMPORT', 'import');
|
|
45
46
|
}
|
|
46
47
|
return getMagicStringResult();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.238-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.238-commit-d48a597";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.238-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.238-commit-d48a597';
|