新增:打包编译功能

This commit is contained in:
李强
2024-06-18 12:46:57 +08:00
parent 1f81ac5854
commit 38bb65f9d5
137 changed files with 2481 additions and 6332 deletions

11
web/.env.local_prod Normal file
View File

@@ -0,0 +1,11 @@
# 线上环境
ENV = 'local_prod'
# 线上环境接口地址
VITE_API_URL = '/'
# 是否启用按钮权限
VITE_PM_ENABLED = true
VITE_PUBLIC_PATH = /web/
# dist目录
VITE_DIST_PATH =../backend/templates/web/

View File

@@ -1,11 +1,12 @@
{
"name": "django-vue3-admin",
"version": "3.0.0",
"version": "3.0.3",
"description": "是一套全部开源的快速开发平台,毫无保留给个人免费使用、团体授权使用。\n django-vue3-admin 基于RBAC模型的权限控制的一整套基础开发平台权限粒度达到列级别前后端分离后端采用django + django-rest-framework前端采用基于 vue3 + CompositionAPI + typescript + vite + element plus",
"license": "MIT",
"scripts": {
"dev": "vite --force",
"build": "vite build",
"build:local": "vite build --mode local_prod",
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
},
"dependencies": {

View File

@@ -40,7 +40,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
},
},
build: {
outDir: 'dist',
outDir: env.VITE_DIST_PATH || 'dist',
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {