mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 02:29:19 +08:00
refacor: 重构目录架构
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { resolve } from 'node:path';
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
/** 功能脚本独立构建 → artifacts/features/(部署到后端静态目录) */
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
},
|
||||
build: {
|
||||
outDir: 'artifacts/features',
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/features/pdd-ad-fee/index.ts'),
|
||||
name: 'EcbiFeaturePddAdFee',
|
||||
formats: ['iife'],
|
||||
fileName: () => 'pdd-ad-fee.js',
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
inlineDynamicImports: true,
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
minify: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user