Files
WebChat/wxt.config.ts
molvqingtai 0df220049c chore: update development start URL to example.com
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 22:44:53 +08:00

61 lines
1.3 KiB
TypeScript

import path from 'node:path'
import { defineConfig } from 'wxt'
import react from '@vitejs/plugin-react'
import { name, displayName, homepage } from './package.json'
import svgr from 'vite-plugin-svgr'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
srcDir: path.resolve('src'),
imports: false,
entrypointsDir: 'app',
webExt: {
startUrls: ['http://www.example.com/'],
openDevtools: true
},
manifest: ({ browser }) => {
const common = {
name: displayName,
permissions: ['storage', 'notifications', 'tabs'],
homepage_url: homepage,
icons: {
'16': 'logo.png',
'32': 'logo.png',
'48': 'logo.png',
'128': 'logo.png'
},
action: {}
}
return {
chrome: {
...common
},
firefox: {
...common,
browser_specific_settings: {
gecko: {
id: 'molvqingtai@gmail.com'
}
}
}
}[browser]
},
vite: (env) => ({
define: {
__DEV__: env.mode === 'development',
__NAME__: JSON.stringify(name)
},
plugins: [
react({
babel: {
plugins: ['babel-plugin-react-compiler']
}
}),
tailwindcss(),
svgr({
include: '**/*.svg'
})
]
})
})