wxt.config.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. permissions: [
  26. 'storage',
  27. 'history',
  28. 'tabs',
  29. 'activeTab',
  30. 'webNavigation',
  31. 'webRequest',
  32. 'sidePanel'
  33. ],
  34. content_security_policy: {
  35. extension_pages: "script-src 'self'; object-src 'self';"
  36. },
  37. action: {
  38. default_title: '派维斯智能体助手'
  39. },
  40. options_page: 'options.html'
  41. },
  42. modules: ['@wxt-dev/module-vue']
  43. })