@tomjs/create-app 5.5.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/README.zh_CN.md +2 -0
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
- package/templates/config/package.json +20 -20
- package/templates/config/react/pnpm-workspace.yaml +5 -0
- package/templates/config/vue/pnpm-workspace.yaml +4 -0
- package/templates/crx-react/manifest.config.ts +28 -0
- package/templates/crx-react/package.json +14 -0
- package/templates/crx-react/public/logo.png +0 -0
- package/templates/crx-react/src/assets/crx.svg +4 -0
- package/templates/crx-react/src/assets/react.svg +1 -0
- package/templates/crx-react/src/assets/vite.svg +1 -0
- package/templates/crx-react/src/components/HelloWorld.tsx +35 -0
- package/templates/crx-react/src/content/main.tsx +14 -0
- package/templates/crx-react/src/content/views/App.css +56 -0
- package/templates/crx-react/src/content/views/App.tsx +23 -0
- package/templates/crx-react/src/popup/App.css +49 -0
- package/templates/crx-react/src/popup/App.tsx +22 -0
- package/templates/crx-react/src/popup/index.css +84 -0
- package/templates/crx-react/src/popup/index.html +10 -0
- package/templates/crx-react/src/popup/main.tsx +10 -0
- package/templates/crx-react/src/sidepanel/App.css +49 -0
- package/templates/crx-react/src/sidepanel/App.tsx +22 -0
- package/templates/crx-react/src/sidepanel/index.css +83 -0
- package/templates/crx-react/src/sidepanel/index.html +10 -0
- package/templates/crx-react/src/sidepanel/main.tsx +10 -0
- package/templates/crx-react/vite.config.ts +28 -0
- package/templates/crx-vue/README.md +1 -0
- package/templates/crx-vue/manifest.config.ts +28 -0
- package/templates/crx-vue/package.json +14 -0
- package/templates/crx-vue/pnpm-workspace.yaml +4 -0
- package/templates/crx-vue/public/logo.png +0 -0
- package/templates/crx-vue/src/assets/crx.svg +4 -0
- package/templates/crx-vue/src/assets/vite.svg +1 -0
- package/templates/crx-vue/src/assets/vue.svg +1 -0
- package/templates/crx-vue/src/components/HelloWorld.vue +38 -0
- package/templates/crx-vue/src/content/main.ts +17 -0
- package/templates/crx-vue/src/content/views/App.vue +76 -0
- package/templates/crx-vue/src/env.d.ts +3 -0
- package/templates/crx-vue/src/popup/App.vue +39 -0
- package/templates/crx-vue/src/popup/index.html +10 -0
- package/templates/crx-vue/src/popup/main.ts +5 -0
- package/templates/crx-vue/src/popup/style.css +84 -0
- package/templates/crx-vue/src/sidepanel/App.vue +39 -0
- package/templates/crx-vue/src/sidepanel/index.html +10 -0
- package/templates/crx-vue/src/sidepanel/main.ts +5 -0
- package/templates/crx-vue/src/sidepanel/style.css +83 -0
- package/templates/crx-vue/vite.config.ts +38 -0
- package/templates/web-vue/README.md +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url';
|
|
2
|
+
import { crx } from '@crxjs/vite-plugin';
|
|
3
|
+
import vue from '@vitejs/plugin-vue';
|
|
4
|
+
import UnoCSS from 'unocss/vite';
|
|
5
|
+
import AutoImport from 'unplugin-auto-import/vite';
|
|
6
|
+
import Components from 'unplugin-vue-components/vite';
|
|
7
|
+
import { defineConfig } from 'vite';
|
|
8
|
+
import devtools from 'vite-plugin-vue-devtools';
|
|
9
|
+
import manifest from './manifest.config.ts';
|
|
10
|
+
|
|
11
|
+
// https://vite.dev/config/
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
resolve: {
|
|
14
|
+
alias: {
|
|
15
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
server: {
|
|
19
|
+
cors: {
|
|
20
|
+
origin: [
|
|
21
|
+
/chrome-extension:\/\//,
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
plugins: [
|
|
26
|
+
vue(),
|
|
27
|
+
AutoImport({
|
|
28
|
+
dts: './src/auto-imports.d.ts',
|
|
29
|
+
imports: ['vue', 'vue-router', '@vueuse/core'],
|
|
30
|
+
}),
|
|
31
|
+
Components({
|
|
32
|
+
dts: './src/components.d.ts',
|
|
33
|
+
}),
|
|
34
|
+
crx({ manifest }),
|
|
35
|
+
UnoCSS(),
|
|
36
|
+
devtools(),
|
|
37
|
+
],
|
|
38
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
# vue example
|
|
1
|
+
# crx vue example
|