PluginProbe
The Innovative Form Builder – IvyForms / 1.1.1
The Innovative Form Builder – IvyForms v1.1.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / vite.config.ts

vite.config.ts in The Innovative Form Builder – IvyForms 1.1.1, at frontend/vite.config.ts

81 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { defineConfig } from 'vite'
2 import { fileURLToPath, URL } from 'node:url'
3 import vue from '@vitejs/plugin-vue'
4 import Components from 'unplugin-vue-components/vite'
5 import AutoImport from 'unplugin-auto-import/vite'
6 import svgLoader from 'vite-svg-loader'
7 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
8
9 export default defineConfig(() => ({
10 plugins: [
11 vue(),
12 svgLoader(),
13 Components({
14 dirs: ['src'],
15 dts: 'src/components.d.ts',
16 resolvers: [ElementPlusResolver()],
17 }),
18 AutoImport({
19 imports: ['vue', 'pinia'],
20 dirs: ['src/utils', 'src/types', 'src/stores', 'src/composables', 'src/constants'],
21 dts: 'src/auto-imports.d.ts',
22 resolvers: [ElementPlusResolver()],
23 vueTemplate: true,
24 eslintrc: {
25 enabled: true,
26 },
27 }),
28 ],
29 optimizeDeps: {
30 include: ['vue', 'pinia', 'element-plus'],
31 },
32 server: {
33 port: 5173, // Ensure this matches the port in the PHP file
34 strictPort: true,
35 cors: true,
36 },
37 build: {
38 target: 'es2022',
39 sourcemap: false,
40 cssCodeSplit: true,
41 rollupOptions: {
42 input: {
43 admin: fileURLToPath(new URL('./src/assets/js/admin/admin.ts', import.meta.url)),
44 public: fileURLToPath(new URL('./src/assets/js/public/public.ts', import.meta.url)),
45 'ivyforms-angie': fileURLToPath(
46 new URL('./src/ai/angie/ivyforms-mcp-server.ts', import.meta.url),
47 ),
48 },
49 output: {
50 chunkFileNames: 'chunks/[name]-[hash].js',
51 entryFileNames: (chunkInfo) => {
52 if (chunkInfo.name === 'ivyforms-angie') {
53 return '[name].js'
54 }
55 return '[name].js'
56 },
57 assetFileNames: '[name].[ext]',
58 format: 'es',
59 },
60 },
61 },
62 resolve: {
63 alias: {
64 vue: 'vue/dist/vue.esm-bundler.js',
65 '@': fileURLToPath(new URL('./src', import.meta.url)),
66 },
67 },
68 css: {
69 devSourcemap: true,
70 preprocessorOptions: {
71 scss: {
72 api: 'modern-compiler',
73 additionalData: `
74 @use '@/assets/scss/abstracts/all' as *;
75 @use '@/assets/scss/colors/primitives/all' as *;
76 `,
77 },
78 },
79 },
80 }))
81