jewpms/vite.config.mts
user b2d5a8e287 feat: 新增订单明细管理功能
新增订单明细表(jhi_orderdtl)及相关实体、仓库、服务和API接口,支持订单明细的增删改查操作。使用Liquibase创建表结构并加载示例数据,确保系统功能一致性和数据完整性。
2025-04-21 20:31:58 +08:00

52 lines
1.6 KiB
TypeScript

import { URL, fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// eslint-disable-next-line prefer-const
const config = defineConfig({
plugins: [vue()],
root: fileURLToPath(new URL('./src/main/webapp/', import.meta.url)),
publicDir: fileURLToPath(new URL('./target/classes/static/public', import.meta.url)),
cacheDir: fileURLToPath(new URL('./target/.vite-cache', import.meta.url)),
build: {
emptyOutDir: true,
outDir: fileURLToPath(new URL('./target/classes/static/', import.meta.url)),
rollupOptions: {
input: {
app: fileURLToPath(new URL('./src/main/webapp/index.html', import.meta.url)),
},
external: ['vue-web-cam', '@ericblade/quagga2'],
},
},
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
'@': fileURLToPath(new URL('./src/main/webapp/app/', import.meta.url)),
'@content': fileURLToPath(new URL('./src/main/webapp/content/', import.meta.url)),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
},
define: {
I18N_HASH: '"generated_hash"',
SERVER_API_URL: '"/"',
APP_VERSION: `"${process.env.APP_VERSION ? process.env.APP_VERSION : 'DEV'}"`,
},
server: {
host: true,
port: 9000,
proxy: Object.fromEntries(
['/api', '/management', '/v3/api-docs', '/login'].map(res => [
res,
{
target: 'http://localhost:8080',
},
]),
),
allowedHosts: ['dev.vxnet.cn'], // 允许的域名
},
});
// jhipster-needle-add-vite-config - JHipster will add custom config
export default config;