diff --git a/frontend/uniapp/manifest.json b/frontend/uniapp/manifest.json index fbc39f16b72a5655def3fa8b162cef4a8f07bd7d..0df324db61b10ac2b3c9c4c398f739578042e5b2 100644 --- a/frontend/uniapp/manifest.json +++ b/frontend/uniapp/manifest.json @@ -1,6 +1,6 @@ { "name" : "uniapp", - "appid" : "", + "appid" : "__UNI__AFDE007", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/frontend/uniapp/package.json b/frontend/uniapp/package.json index 6abe37f59543f58149527d7cf3642e3d4a49e39c..a3aaa31f8436850c0691955c4fc6124bbc8d315a 100644 --- a/frontend/uniapp/package.json +++ b/frontend/uniapp/package.json @@ -4,13 +4,25 @@ "description": "", "main": "main.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "dev:h5": "vite --mode h5", + "dev:mp-weixin": "vite --mode mp-weixin", + "dev:app": "vite --mode app", + "build:h5": "vite build --mode h5", + "build:mp-weixin": "vite build --mode mp-weixin", + "build:app": "vite build --mode app", + "preview": "vite preview" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { + "@dcloudio/uni-cli-shared": "^2.0.2-4070520250711001", "@vant/weapp": "^1.11.7", "pinia": "^3.0.3" + }, + "devDependencies": { + "@dcloudio/vite-plugin-uni": "^3.0.0-alpha-4070520250711001", + "vite": "^5.0.0" } } diff --git a/frontend/uniapp/vite.config.js b/frontend/uniapp/vite.config.js new file mode 100644 index 0000000000000000000000000000000000000000..6b3677847b59ec62e99ba6cbf3ea5e08fd6b890e --- /dev/null +++ b/frontend/uniapp/vite.config.js @@ -0,0 +1,23 @@ +import { defineConfig } from 'vite' +import uni from '@dcloudio/vite-plugin-uni' + +export default defineConfig({ + plugins: [uni()], + server: { + port: 3000, + host: '0.0.0.0' + }, + build: { + outDir: 'unpackage/dist/build/h5', + assetsDir: 'static', + sourcemap: false, + minify: 'terser', + rollupOptions: { + output: { + manualChunks: { + vendor: ['vue', 'pinia'] + } + } + } + } +})