wxt.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. ],
  36. content_security_policy: {
  37. extension_pages: "script-src 'self'; object-src 'self';"
  38. },
  39. action: {
  40. default_title: '派维斯智能体助手'
  41. },
  42. options_page: 'options.html'
  43. },
  44. modules: ['@wxt-dev/module-vue'],
  45. runner: {
  46. chromiumArgs: ["--disable-features=DisableLoadExtensionCommandLineSwitch"],
  47. },
  48. })