wxt.config.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { defineConfig } from 'wxt'
  2. import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
  3. import path from 'path'
  4. // See https://wxt.dev/api/config.html
  5. export default defineConfig({
  6. vite: ({ command }) => {
  7. return {
  8. plugins: [
  9. createSvgIconsPlugin({
  10. iconDirs: [path.resolve(process.cwd(), 'src/assets/svg')],
  11. symbolId: 'icon-[dir]-[name]',
  12. svgoOptions: command === 'build'
  13. })
  14. ]
  15. }
  16. },
  17. extensionApi: 'chrome',
  18. srcDir: 'src',
  19. manifest: {
  20. name: '派维斯智能体助手',
  21. version: '0.2.0',
  22. icons: {
  23. "16": "icon/icon.png",
  24. "32": "icon/icon.png"
  25. },
  26. permissions: [
  27. 'storage',
  28. 'history',
  29. 'tabs',
  30. 'activeTab',
  31. 'webNavigation',
  32. 'webRequest',
  33. 'sidePanel',
  34. "debugger",
  35. 'scripting'
  36. ],
  37. host_permissions: [
  38. "<all_urls>"
  39. ],
  40. content_security_policy: {
  41. extension_pages: "script-src 'self'; object-src 'self';"
  42. },
  43. action: {
  44. default_title: '派维斯智能体助手'
  45. },
  46. options_page: 'options.html'
  47. },
  48. modules: ['@wxt-dev/module-vue'],
  49. runner: {
  50. chromiumArgs: ["--disable-features=DisableLoadExtensionCommandLineSwitch"],
  51. },
  52. })