@vixt/uni 0.5.7 → 0.5.9
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.mjs +5 -2
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateClient, generateCss, generateAppConfig, generatePlugins, defineVixtModule, generateIndexHtml, defineVitePlugin, resolveLayersDirs, createVixtPlugin } from '@vixt/core';
|
|
1
|
+
import { generateClient, generateCss, generateAppConfig, generatePlugins, defineVixtModule, generateIndexHtml, defineVitePlugin, resolveLayersDirs, isSamePath, createVixtPlugin } from '@vixt/core';
|
|
2
2
|
import path from 'pathe';
|
|
3
3
|
import { genarateAppComponent } from '@vixt/vue';
|
|
4
4
|
import fs from 'fs-extra';
|
|
@@ -10,6 +10,7 @@ import defu from 'defu';
|
|
|
10
10
|
import UnoCSS from 'unocss/vite';
|
|
11
11
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
12
12
|
import { resolvePathSync } from 'mlly';
|
|
13
|
+
import { normalizePath } from 'vite';
|
|
13
14
|
import { readFileSync } from 'node:fs';
|
|
14
15
|
import process from 'node:process';
|
|
15
16
|
import { uniuseAutoImports } from '@uni-helper/uni-use';
|
|
@@ -153,6 +154,7 @@ const uniPatch = defineVitePlugin(() => {
|
|
|
153
154
|
{
|
|
154
155
|
name: "vixt:uni-patch-runtime",
|
|
155
156
|
transform(code, id) {
|
|
157
|
+
id = normalizePath(id);
|
|
156
158
|
code = transformMpRuntime(code, id);
|
|
157
159
|
code = transformH5Runtime(code, id);
|
|
158
160
|
return code;
|
|
@@ -272,6 +274,7 @@ function copyUniModules(options, vixt) {
|
|
|
272
274
|
const destPath = path.join(srcUniModulesPath, dir);
|
|
273
275
|
if (srcPath !== destPath) {
|
|
274
276
|
try {
|
|
277
|
+
fs.removeSync(destPath);
|
|
275
278
|
fs.copySync(srcPath, destPath);
|
|
276
279
|
fs.writeFileSync(path.join(destPath, ".gitignore"), "*", "utf-8");
|
|
277
280
|
} catch (e) {
|
|
@@ -290,7 +293,7 @@ const uniModules = defineVixtModule({
|
|
|
290
293
|
return {
|
|
291
294
|
name,
|
|
292
295
|
configureServer(server) {
|
|
293
|
-
const { uni_modules = [] } = resolveLayersDirs(vixt._layers);
|
|
296
|
+
const { uni_modules = [] } = resolveLayersDirs(vixt._layers.filter((e) => !isSamePath(e.cwd, vixt.options.rootDir)));
|
|
294
297
|
server.watcher.add(uni_modules);
|
|
295
298
|
server.watcher.on("all", (_, file) => {
|
|
296
299
|
const match = uni_modules.some((e) => path.normalize(file).match(e));
|
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.9",
|
|
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.19",
|
|
29
29
|
"@uni-helper/uni-app-types": "^1.0.0-alpha.6",
|
|
30
30
|
"@uni-helper/uni-use": "^0.19.14",
|
|
31
31
|
"@uni-helper/unocss-preset-uni": "^0.2.11",
|
|
32
32
|
"@uni-helper/vite-plugin-uni-components": "^0.2.0",
|
|
33
|
-
"@uni-helper/vite-plugin-uni-layouts": "^0.1.
|
|
34
|
-
"@uni-helper/vite-plugin-uni-pages": "^0.2
|
|
35
|
-
"unocss-applet": "^0.
|
|
36
|
-
"@vixt/
|
|
37
|
-
"@vixt/
|
|
33
|
+
"@uni-helper/vite-plugin-uni-layouts": "^0.1.11",
|
|
34
|
+
"@uni-helper/vite-plugin-uni-pages": "^0.3.2",
|
|
35
|
+
"unocss-applet": "^0.11.0",
|
|
36
|
+
"@vixt/vue": "0.5.9",
|
|
37
|
+
"@vixt/core": "0.5.9"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|