@vixt/uni 0.5.12 → 0.5.14
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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +10 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -72,6 +72,8 @@ declare function transformMpRuntime(code: string, id: string): string;
|
|
|
72
72
|
* @see https://ask.dcloud.net.cn/question/194973
|
|
73
73
|
*/
|
|
74
74
|
declare function transformH5Runtime(code: string, id: string): string;
|
|
75
|
+
/** 修复app运行白屏,原因是pinia调用了@vue/devtools-kit的setupDevToolsPlugin */
|
|
76
|
+
declare function transformVueDevtools(code: string, id: string): string;
|
|
75
77
|
/** 移除路径中的'../' */
|
|
76
78
|
declare function patchNormalizeNodeModules(): void;
|
|
77
79
|
/**
|
|
@@ -98,5 +100,5 @@ declare function genarateVirtualUniPagesTypes(vixt: Vixt): void;
|
|
|
98
100
|
|
|
99
101
|
declare const _default: (options?: _vixt_core.VixtOptions | undefined) => vite.PluginOption;
|
|
100
102
|
|
|
101
|
-
export { appUni, _default as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, uniModules, uniPatch, uniVueUseResolver };
|
|
103
|
+
export { appUni, _default as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, transformVueDevtools, uniModules, uniPatch, uniVueUseResolver };
|
|
102
104
|
export type { ModuleOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ declare function transformMpRuntime(code: string, id: string): string;
|
|
|
72
72
|
* @see https://ask.dcloud.net.cn/question/194973
|
|
73
73
|
*/
|
|
74
74
|
declare function transformH5Runtime(code: string, id: string): string;
|
|
75
|
+
/** 修复app运行白屏,原因是pinia调用了@vue/devtools-kit的setupDevToolsPlugin */
|
|
76
|
+
declare function transformVueDevtools(code: string, id: string): string;
|
|
75
77
|
/** 移除路径中的'../' */
|
|
76
78
|
declare function patchNormalizeNodeModules(): void;
|
|
77
79
|
/**
|
|
@@ -98,5 +100,5 @@ declare function genarateVirtualUniPagesTypes(vixt: Vixt): void;
|
|
|
98
100
|
|
|
99
101
|
declare const _default: (options?: _vixt_core.VixtOptions | undefined) => vite.PluginOption;
|
|
100
102
|
|
|
101
|
-
export { appUni, _default as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, uniModules, uniPatch, uniVueUseResolver };
|
|
103
|
+
export { appUni, _default as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, transformVueDevtools, uniModules, uniPatch, uniVueUseResolver };
|
|
102
104
|
export type { ModuleOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -122,6 +122,14 @@ function transformH5Runtime(code, id) {
|
|
|
122
122
|
code = code.replace(`def(children, "_", type);`, `def(children, "_", type, true);`);
|
|
123
123
|
return code;
|
|
124
124
|
}
|
|
125
|
+
function transformVueDevtools(code, id) {
|
|
126
|
+
if (!id.endsWith("@vue/devtools-kit/dist/index.js"))
|
|
127
|
+
return code;
|
|
128
|
+
code = code.replace(`function setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
129
|
+
return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
|
|
130
|
+
}`, `function setupDevToolsPlugin(pluginDescriptor, setupFn) {}`);
|
|
131
|
+
return code;
|
|
132
|
+
}
|
|
125
133
|
function patchNormalizeNodeModules() {
|
|
126
134
|
const matched = `str = normalizePath(str).replace(NODE_MODULES_REGEX, 'node-modules');`;
|
|
127
135
|
const replaced = `str = normalizePath(str).replace(NODE_MODULES_REGEX, 'node-modules').replace(/\\.\\.\\//g, '');`;
|
|
@@ -157,6 +165,7 @@ const uniPatch = defineVitePlugin(() => {
|
|
|
157
165
|
id = normalizePath(id);
|
|
158
166
|
code = transformMpRuntime(code, id);
|
|
159
167
|
code = transformH5Runtime(code, id);
|
|
168
|
+
code = transformVueDevtools(code, id);
|
|
160
169
|
return code;
|
|
161
170
|
}
|
|
162
171
|
},
|
|
@@ -334,4 +343,4 @@ const defaults = {
|
|
|
334
343
|
};
|
|
335
344
|
const index = createVixtPlugin({ defaults });
|
|
336
345
|
|
|
337
|
-
export { appUni, index as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, uniModules, uniPatch, uniVueUseResolver };
|
|
346
|
+
export { appUni, index as default, genarateVirtualUniPagesTypes, generateMainTs, patchAdjustCssExtname, patchNormalizeNodeModules, patchUniComponents, patchUnocssGlobalBuildScan, presetUni, transformH5Runtime, transformMpRuntime, transformVueDevtools, uniModules, uniPatch, uniVueUseResolver };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/uni",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.14",
|
|
5
5
|
"author": "SoulLyoko<https://github.com/SoulLyoko>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://soullyoko.github.io/vixt/",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dcloudio/types": "^3.4.
|
|
28
|
+
"@dcloudio/types": "^3.4.16",
|
|
29
29
|
"@uni-helper/uni-app-types": "^1.0.0-alpha.6",
|
|
30
30
|
"@uni-helper/uni-use": "^0.19.15",
|
|
31
31
|
"@uni-helper/unocss-preset-uni": "^0.2.11",
|
|
32
32
|
"@uni-helper/vite-plugin-uni-components": "^0.2.3",
|
|
33
33
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.11",
|
|
34
|
-
"@uni-helper/vite-plugin-uni-pages": "^0.3.
|
|
35
|
-
"unocss-applet": "^0.
|
|
36
|
-
"@vixt/core": "0.5.
|
|
37
|
-
"@vixt/vue": "0.5.
|
|
34
|
+
"@uni-helper/vite-plugin-uni-pages": "^0.3.21",
|
|
35
|
+
"unocss-applet": "^0.12.2",
|
|
36
|
+
"@vixt/core": "0.5.14",
|
|
37
|
+
"@vixt/vue": "0.5.14"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|