msr-mod/vite.config.ts
Astrian Zheng 97d7bc0f4e
chore: 更新项目配置和样式以支持TailwindCSS
- 添加TailwindCSS依赖并配置Vite插件
- 修改App.vue中的文本内容
- 清理background.js中的冗余日志
- 更新index.html中的脚本路径以支持本地开发
- 在manifest.json中添加localhost权限和CSP配置
2025-05-24 09:16:03 +10:00

29 lines
896 B
TypeScript

import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue(), tailwindcss()],
base: './', // Ensure relative paths work
build: {
outDir: 'dist',
rollupOptions: {
// Optional: configure input if you have multiple HTML files (e.g., options page)
// input: {
// popup: resolve(__dirname, 'index.html'),
// // options: resolve(__dirname, 'options.html'), // If you have an options page
// },
output: {
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]',
// Optional: to disable hashing for specific assets if needed
// entryFileNames: `assets/[name].js`,
// chunkFileNames: `assets/[name].js`,
// assetFileNames: `assets/[name].[ext]`
},
},
},
})