代码拉取完成,页面将自动刷新
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import VueDevTools from 'vite-plugin-vue-devtools'
import { crx, defineManifest } from '@crxjs/vite-plugin'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import basicSsl from '@vitejs/plugin-basic-ssl'
const manifest = defineManifest({
manifest_version: 3,
name: '颜色管理器',
version: '0.0.1',
permissions: ['tabs', 'contextMenus', 'activeTab', 'scripting', 'storage'],
icons: {
16: 'icon-x16.png',
32: 'icon-x32.png',
48: 'icon-x48.png',
128: 'icon-x48.png'
},
background: {
type: 'module',
service_worker: 'src/background/index.ts'
},
action: {},
host_permissions: ['<all_urls>'],
// content_security_policy: {},
content_scripts: [
{
js: ['src/inject/main.ts'],
matches: ['http://*/*', 'https://*/*'],
exclude_matches: ['https://element-plus.gitee.io/*']
}
]
})
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vueJsx(),
// VueDevTools(),
// basicSsl(),
crx({ manifest }),
AutoImport({ resolvers: [ElementPlusResolver()] }),
Components({ resolvers: [ElementPlusResolver()] })
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@shared': fileURLToPath(new URL('./src/shared', import.meta.url))
}
},
server: {
host: true
// https: {}
}
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。