diff --git a/build/transform/require-context/index.ts b/build/plugin/vite-plugin-context-plugin/transform.ts similarity index 99% rename from build/transform/require-context/index.ts rename to build/plugin/vite-plugin-context-plugin/transform.ts index 0800a3ba..5ef211b3 100644 --- a/build/transform/require-context/index.ts +++ b/build/plugin/vite-plugin-context-plugin/transform.ts @@ -1,3 +1,4 @@ +// 修改自 // https://github.com/luxueyan/vite-transform-globby-import/blob/master/src/index.ts // TODO 目前还不能监听文件新增及删除 内容已经改变,缓存问题? diff --git a/build/script/build.ts b/build/script/build.ts index a87373a1..ed018ce8 100644 --- a/build/script/build.ts +++ b/build/script/build.ts @@ -1,6 +1,7 @@ // #!/usr/bin/env node import { sh } from 'tasksfile'; + import { argv } from 'yargs'; import { runBuildConfig } from './buildConf'; import { runUpdateHtml } from './updateHtml'; @@ -9,7 +10,7 @@ import { errorConsole, successConsole } from '../utils'; export const runBuild = async () => { try { const argvList = argv._; - let cmd = `cross-env NODE_ENV=production vite build`; + let cmd = `npx cross-env NODE_ENV=production vite build`; await sh(cmd, { async: true, nopipe: true, diff --git a/package.json b/package.json index f9ddfbe1..6813b712 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin-2.0", - "version": "2.0.0-beta.7", + "version": "2.0.0-beta.8", "scripts": { "bootstrap": "yarn install", "serve": "node ./build/jsc.js preserve && cross-env NODE_ENV=development vite", diff --git a/postcss.config.js b/postcss.config.js index 501d0498..ded38c3f 100755 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,4 +1,3 @@ -const path = require('path'); module.exports = { plugins: [require('autoprefixer'), require('postcss-import')], }; diff --git a/src/components/Menu/src/BasicMenu.tsx b/src/components/Menu/src/BasicMenu.tsx index 74731096..217f1455 100644 --- a/src/components/Menu/src/BasicMenu.tsx +++ b/src/components/Menu/src/BasicMenu.tsx @@ -91,7 +91,7 @@ export default defineComponent({ }); watch( - () => currentRoute.value.name, + () => currentRoute.value.path, (name: string) => { name !== 'Redirect' && handleMenuChange(); getParentPath(); @@ -210,7 +210,7 @@ export default defineComponent({ : {}; return (