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. runner: {
  18. chromiumArgs: ["--disable-features=DisableLoadExtensionCommandLineSwitch"],
  19. },
  20. extensionApi: 'chrome',
  21. srcDir: 'src',
  22. manifest: {
  23. name: '派维斯智能体助手',
  24. version: '0.2.0',
  25. icons: {
  26. "16": "icon/icon.png",
  27. "32": "icon/icon.png"
  28. },
  29. permissions: [
  30. 'storage',
  31. 'history',
  32. 'tabs',
  33. 'activeTab',
  34. 'webNavigation',
  35. 'webRequest',
  36. 'sidePanel',
  37. "debugger",
  38. 'scripting'
  39. ],
  40. host_permissions: [
  41. "<all_urls>"
  42. ],
  43. content_security_policy: {
  44. extension_pages: "script-src 'self'; object-src 'self';"
  45. },
  46. action: {
  47. default_title: '派维斯智能体助手'
  48. },
  49. options_page: 'options.html'
  50. },
  51. modules: ['@wxt-dev/module-vue']
  52. })