public
1 year ago
src
1 year ago
.eslintrc.js
4 years ago
.prettierrc.js
4 years ago
index.html
4 years ago
package-lock.json
1 year ago
package.json
1 year ago
vite.config.js
1 year ago
vite.config.js
82 lines
| 1 | import { defineConfig } from 'vite' |
| 2 | import vue from '@vitejs/plugin-vue' |
| 3 | import Inspect from 'vite-plugin-inspect' |
| 4 | import AutoImport from 'unplugin-auto-import/vite' |
| 5 | import Components from 'unplugin-vue-components/vite' |
| 6 | import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' |
| 7 | import { useDynamicPublicPath } from 'vite-plugin-dynamic-publicpath' |
| 8 | |
| 9 | const path = require('path') |
| 10 | |
| 11 | // https://vitejs.dev/config/ |
| 12 | export default defineConfig({ |
| 13 | plugins: [ |
| 14 | vue(), |
| 15 | Inspect(), |
| 16 | useDynamicPublicPath({ |
| 17 | dynamicImportHandler: 'window.__dynamic_handler__', |
| 18 | dynamicImportPreload: 'window.__dynamic_preload__' |
| 19 | }), |
| 20 | AutoImport({ |
| 21 | imports: ['vue', '@vueuse/core'], |
| 22 | resolvers: [ElementPlusResolver()] |
| 23 | }), |
| 24 | Components({ |
| 25 | resolvers: [ElementPlusResolver()] |
| 26 | }) |
| 27 | ], |
| 28 | |
| 29 | resolve: { |
| 30 | extensions: ['.js', '.vue', '.json', '.mjs'], |
| 31 | alias: { |
| 32 | '@css': path.resolve(__dirname, '/src/assets/scss') |
| 33 | } |
| 34 | }, |
| 35 | |
| 36 | css: { |
| 37 | preprocessorOptions: { |
| 38 | scss: { |
| 39 | additionalData: ` |
| 40 | @import "@css/admin/_variables"; |
| 41 | @import "@css/common/variables/_breakpoints"; |
| 42 | @import "@css/common/icon-fonts/variables"; |
| 43 | @import "@css/common/animations/animations"; |
| 44 | ` |
| 45 | } |
| 46 | } |
| 47 | }, |
| 48 | |
| 49 | base: '', |
| 50 | |
| 51 | build: { |
| 52 | target: 'esnext', |
| 53 | chunkSizeWarningLimit: 1500, |
| 54 | rollupOptions: { |
| 55 | input: ['src/assets/js/admin/admin.js', 'src/assets/js/public/public.js'], |
| 56 | output: { |
| 57 | manualChunks: { |
| 58 | stepForm: [ |
| 59 | 'src/views/public/StepForm/BookingStepForm.vue', |
| 60 | ], |
| 61 | catalogForm: [ |
| 62 | 'src/views/public/CatalogForm/CatalogForm.vue', |
| 63 | ], |
| 64 | eventListForm: [ |
| 65 | 'src/views/public/EventForm/EventListForm/EventsListForm.vue' |
| 66 | ], |
| 67 | eventCalendarForm: [ |
| 68 | 'src/views/public/EventForm/EventCalendarForm/EvensCalendarForm.vue' |
| 69 | ], |
| 70 | customerPanel: [ |
| 71 | 'src/views/public/Cabinet/CustomerPanel/CustomerPanel.vue', |
| 72 | ], |
| 73 | customizeForm: [ |
| 74 | 'src/views/admin/customize/Customize.vue', |
| 75 | ], |
| 76 | }, |
| 77 | } |
| 78 | }, |
| 79 | outDir: './public' |
| 80 | } |
| 81 | }) |
| 82 |