PluginProbe
The Innovative Form Builder – IvyForms / 0.6
The Innovative Form Builder – IvyForms v0.6
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 0.6, at frontend/vite.config.ts

68 lines 1.9 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 VueDevTools from 'vite-plugin-vue-devtools'
5 import Components from 'unplugin-vue-components/vite'
6 import AutoImport from 'unplugin-auto-import/vite'
7 import svgLoader from 'vite-svg-loader'
8 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
9
10 export default defineConfig( {
11 plugins: [
12 vue(),
13 VueDevTools(),
14 svgLoader(),
15 Components({
16 dirs: ['src'],
17 dts: 'src/components.d.ts',
18 resolvers: [
19 ElementPlusResolver()
20 ],
21 }),
22 AutoImport({
23 imports: ['vue', 'pinia'],
24 dirs: ['src/utils', 'src/types', 'src/stores', 'src/composables', 'src/constants'],
25 dts: 'src/auto-imports.d.ts',
26 resolvers: [ElementPlusResolver()],
27 vueTemplate: true,
28 eslintrc: {
29 enabled: true,
30 },
31 }),
32 ],
33 server: {
34 port: 5173, // Ensure this matches the port in the PHP file
35 strictPort: true,
36 cors: true,
37 },
38 build: {
39 rollupOptions: {
40 input: {
41 admin: fileURLToPath(new URL('./src/assets/js/admin/admin.ts', import.meta.url)),
42 public: fileURLToPath(new URL('./src/assets/js/public/public.ts', import.meta.url)),
43 },
44 output: {
45 chunkFileNames: 'chunks/[name]-[hash].js',
46 entryFileNames: '[name].js',
47 assetFileNames: '[name].[ext]',
48 },
49 },
50 },
51 resolve: {
52 alias: {
53 vue: 'vue/dist/vue.esm-bundler.js',
54 '@': fileURLToPath(new URL('./src', import.meta.url)),
55 },
56 },
57 css: {
58 preprocessorOptions: {
59 scss: {
60 api: 'modern-compiler', // or "modern", "legacy"
61 additionalData: `
62 @use '@/assets/scss/main' as *;
63 `,
64 },
65 },
66 },
67 });
68