镜像自地址
https://github.com/lhly/cloud-drive-renamer.git
已同步 2026-10-20 21:57:47 +08:00
- 添加项目基础配置文件和构建工具配置 - 实现夸克网盘批量重命名核心功能 - 添加多语言支持和国际化配置 - 实现重命名规则引擎和多种重命名规则 - 添加测试框架和测试用例 - 配置CI/CD自动化流程 - 添加文档和快速入门指南
44 行
929 B
TypeScript
44 行
929 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { crx } from '@crxjs/vite-plugin';
|
|
import manifest from './manifest.json';
|
|
|
|
export default defineConfig({
|
|
plugins: [crx({ manifest: manifest as any })],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
popup: 'src/popup/index.html',
|
|
dialog: 'src/dialog/index.html',
|
|
},
|
|
output: {
|
|
entryFileNames: (chunkInfo) => {
|
|
return '[name].js';
|
|
},
|
|
},
|
|
},
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
sourcemap: true,
|
|
// 确保将node_modules中的依赖正确打包
|
|
commonjsOptions: {
|
|
include: [/node_modules/],
|
|
transformMixedEsModules: true,
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': '/src',
|
|
},
|
|
},
|
|
// 确保webcomponents polyfill被正确处理
|
|
optimizeDeps: {
|
|
include: ['@webcomponents/webcomponentsjs'],
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
hmr: {
|
|
host: 'localhost',
|
|
},
|
|
},
|
|
});
|