├── .editorconfig ├── .env.development ├── .env.production ├── .env.staging ├── .eslintignore ├── .eslintrc ├── .github └── dependabot.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .stylelintignore ├── .stylelintrc ├── README.md ├── index.html ├── jest.config.js ├── package.json ├── postcss.config.js ├── public └── favicon.ico ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ └── HelloWorld.vue ├── http │ └── index.ts ├── main.ts ├── router.ts ├── runtimeEnv.ts ├── stores │ └── global.ts ├── views │ ├── AboutPage.vue │ └── HomePage.vue └── vue.d.ts ├── tailwind.config.js ├── tests ├── About.spec.ts └── Home.spec.ts ├── tsconfig.json ├── vite.config.ts ├── wallaby.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_style = space 11 | indent_size = 2 12 | insert_final_newline = true 13 | -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | VITE_APP_TITLE=Vue 3 TS 2 | VITE_API_URL=/ 3 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | VITE_APP_TITLE=Vue 3 TS 2 | VITE_API_URL=/ 3 | -------------------------------------------------------------------------------- /.env.staging: -------------------------------------------------------------------------------- 1 | VITE_APP_TITLE=Vue 3 TS 2 | VITE_API_URL=/ 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /coverage 3 | /dist 4 | /tmp 5 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "node": true, 5 | "jest": true 6 | }, 7 | "parser": "vue-eslint-parser", 8 | "parserOptions": { 9 | "parser": "@typescript-eslint/parser", 10 | "ecmaVersion": 2021 11 | }, 12 | "plugins": ["html", "import"], 13 | "extends": [ 14 | "plugin:@typescript-eslint/recommended", 15 | "plugin:vue/vue3-recommended", 16 | "prettier" 17 | ], 18 | "rules": { 19 | "no-console": "warn", 20 | "no-debugger": "warn", 21 | "vue/component-tags-order": [ 22 | "error", 23 | { 24 | "order": ["script", "template", "style"] 25 | } 26 | ], 27 | "vue/component-name-in-template-casing": [ 28 | "error", 29 | "kebab-case", 30 | { "registeredComponentsOnly": true } 31 | ], 32 | "vue/no-reserved-component-names": "error", 33 | "vue/component-api-style": ["error", ["script-setup"]], 34 | "vue/custom-event-name-casing": ["error", "kebab-case"], 35 | "vue/html-comment-content-newline": [ 36 | "error", 37 | { 38 | "singleline": "never", 39 | "multiline": "always" 40 | } 41 | ], 42 | "vue/html-comment-content-spacing": ["error", "always"], 43 | "vue/html-comment-indent": ["error", 2], 44 | "vue/no-boolean-default": ["error", "default-false"], 45 | "vue/no-static-inline-styles": [ 46 | "error", 47 | { 48 | "allowBinding": false 49 | } 50 | ], 51 | "vue/no-undef-components": [ 52 | "error", 53 | { "ignorePatterns": ["router-link", "router-view"] } 54 | ], 55 | "vue/no-lone-template": [ 56 | "error", 57 | { 58 | "ignoreAccessible": false 59 | } 60 | ], 61 | "vue/no-useless-v-bind": [ 62 | "error", 63 | { 64 | "ignoreIncludesComment": false, 65 | "ignoreStringEscape": false 66 | } 67 | ], 68 | "vue/no-v-text": ["error"], 69 | "vue/padding-line-between-blocks": ["error", "always"], 70 | "vue/v-for-delimiter-style": ["error", "of"], 71 | "vue/v-on-event-hyphenation": [ 72 | "error", 73 | "always", 74 | { 75 | "autofix": true 76 | } 77 | ], 78 | "vue/v-on-function-call": ["error", "never"], 79 | "import/order": [ 80 | "error", 81 | { 82 | "groups": [ 83 | "builtin", 84 | "external", 85 | "internal", 86 | "parent", 87 | "sibling", 88 | "index", 89 | "object", 90 | "type", 91 | "unknown" 92 | ], 93 | "pathGroups": [ 94 | { 95 | "pattern": "@/+(runtimeEnv|store|router)", 96 | "group": "external", 97 | "position": "after" 98 | }, 99 | { 100 | "pattern": "@/modules/**", 101 | "group": "internal", 102 | "position": "after" 103 | }, 104 | { 105 | "pattern": "@/shared/**", 106 | "group": "internal", 107 | "position": "after" 108 | }, 109 | { 110 | "pattern": "@/utils/**", 111 | "group": "internal", 112 | "position": "after" 113 | }, 114 | { 115 | "pattern": "@/http/**!(dto)", 116 | "group": "internal", 117 | "position": "after" 118 | }, 119 | { 120 | "pattern": "@/http/dto/**", 121 | "group": "internal", 122 | "position": "after" 123 | }, 124 | { 125 | "pattern": "@/ui/**/!(*.vue)", 126 | "group": "internal", 127 | "position": "after" 128 | }, 129 | { 130 | "pattern": "@/ui/**/*.vue", 131 | "group": "internal", 132 | "position": "after" 133 | }, 134 | { 135 | "pattern": "{./,../,../../,../../../,../../../../}**/*.vue", 136 | "group": "parent", 137 | "position": "after" 138 | } 139 | ], 140 | "alphabetize": { 141 | "order": "asc", 142 | "caseInsensitive": false 143 | }, 144 | "newlines-between": "always" 145 | } 146 | ] 147 | }, 148 | "overrides": [ 149 | { 150 | "files": ["**/*.spec.ts"], 151 | "rules": { "@typescript-eslint/no-explicit-any": "off" } 152 | } 153 | ] 154 | } 155 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # tmp & compiled output 2 | dist 3 | /tmp 4 | /bundle-stats.html 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | lerna-debug.log* 13 | .eslintcache 14 | .stylelintcache 15 | 16 | # OS 17 | .DS_Store 18 | /node_modules 19 | 20 | # Tests 21 | /coverage 22 | /.nyc_output 23 | 24 | # IDEs and editors 25 | /.idea 26 | .project 27 | .classpath 28 | .c9/ 29 | *.launch 30 | .settings/ 31 | *.sublime-workspace 32 | 33 | # IDE - VSCode 34 | .vscode/* 35 | !.vscode/settings.json 36 | !.vscode/tasks.json 37 | !.vscode/launch.json 38 | !.vscode/extensions.json 39 | 40 | # Configs 41 | .env.*.local 42 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /coverage 3 | /dist 4 | /tmp 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "semi": true, 7 | "endOfLine": "lf" 8 | } 9 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /coverage 3 | /dist 4 | /tmp 5 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "stylelint-config-html", 4 | "stylelint-config-recommended-vue", 5 | "stylelint-config-standard", 6 | "stylelint-config-rational-order", 7 | "stylelint-config-prettier" 8 | ], 9 | "ignoreFiles": ["**/dist/**", "**/node_modules/**", "**/coverage/**"], 10 | "rules": { 11 | "selector-max-attribute": 1, 12 | "selector-max-class": 3, 13 | "selector-max-combinators": 2, 14 | "selector-max-compound-selectors": 2, 15 | "at-rule-no-unknown": [ 16 | true, 17 | { 18 | "ignoreAtRules": [ 19 | "tailwind", 20 | "apply", 21 | "variants", 22 | "responsive", 23 | "screen" 24 | ] 25 | } 26 | ], 27 | "declaration-block-trailing-semicolon": null, 28 | "no-descending-specificity": null, 29 | "selector-class-pattern": [ 30 | "[a-z]+", 31 | { 32 | "resolveNestedSelectors": true 33 | } 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + Typescript + Vite 2 | 3 | This template should help get you started developing with Vue 3 and Typescript in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings! 8 | 9 | ### If Using ` 13 | 14 | 15 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testRegex: '.*\\.spec\\.ts$', 3 | moduleFileExtensions: ['js', 'ts', 'vue'], 4 | modulePaths: ['/src', '/node_modules'], 5 | transformIgnorePatterns: ['/node_modules/'], 6 | transform: { 7 | '^.+\\.(j|t)sx?$': 'ts-jest', 8 | '^.+\\.(vue)$': 'vue3-jest', 9 | }, 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1', 12 | }, 13 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 14 | testURL: 'http://localhost/', 15 | watchPlugins: [ 16 | 'jest-watch-typeahead/filename', 17 | 'jest-watch-typeahead/testname', 18 | ], 19 | coverageDirectory: 'coverage', 20 | collectCoverageFrom: ['/src/**/*.{js,ts,vue}'], 21 | coveragePathIgnorePatterns: ['^.+\\.d\\.ts$', 'src/runtimeEnv.ts'], 22 | modulePathIgnorePatterns: ['/.yarn-cache/'], 23 | cacheDirectory: '/tmp/cache/jest', 24 | timers: 'fake', 25 | testEnvironment: 'jsdom', 26 | }; 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-next", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vue-tsc --noEmit && vite build", 8 | "build:force": "vite build", 9 | "serve": "vite preview", 10 | "lint:eslint": "yarn eslint --cache --max-warnings 0 --report-unused-disable-directives \"**/*.{js,ts,vue,html}\"", 11 | "lint:eslint:fix": "yarn lint:eslint --fix", 12 | "lint:prettier": "yarn prettier --check \"**/*.{js,json,ts,vue,html}\"", 13 | "lint:prettier:fix": "yarn prettier --write \"**/*.{js,json,ts,vue,html}\"", 14 | "lint:stylelint": "yarn stylelint --cache -q \"**/*.{vue,css}\"", 15 | "lint:stylelint:fix": "yarn lint:stylelint --fix", 16 | "lint": "yarn lint:eslint && yarn lint:prettier && yarn lint:stylelint", 17 | "test": "jest", 18 | "test:watch": "jest --watch", 19 | "test:cov": "jest --coverage", 20 | "precommit": "yarn lint && yarn test && yarn build" 21 | }, 22 | "dependencies": { 23 | "axios": "^1.4.0", 24 | "js-cookie": "^3.0.5", 25 | "normalize.css": "8.0.1", 26 | "pinia": "^2.0.9", 27 | "qs": "6.11.2", 28 | "vue": "^3.2.26", 29 | "vue-router": "^4.2.4" 30 | }, 31 | "devDependencies": { 32 | "@pinia/testing": "^0.1.3", 33 | "@types/jest": "29.5.3", 34 | "@types/js-cookie": "3.0.3", 35 | "@types/qs": "6.9.7", 36 | "@typescript-eslint/eslint-plugin": "6.2.1", 37 | "@typescript-eslint/parser": "6.2.1", 38 | "@vitejs/plugin-vue": "4.2.3", 39 | "@vue/compiler-sfc": "3.3.4", 40 | "@vue/test-utils": "2.4.1", 41 | "autoprefixer": "10.4.14", 42 | "eslint": "8.46.0", 43 | "eslint-config-prettier": "8.10.0", 44 | "eslint-plugin-html": "7.1.0", 45 | "eslint-plugin-import": "2.28.0", 46 | "eslint-plugin-vue": "9.16.1", 47 | "jest": "29.6.2", 48 | "jest-serializer-vue": "3.1.0", 49 | "jest-watch-typeahead": "2.2.2", 50 | "postcss": "8.4.27", 51 | "postcss-html": "1.5.0", 52 | "prettier": "3.0.1", 53 | "rollup-plugin-visualizer": "5.9.2", 54 | "stylelint": "15.10.2", 55 | "stylelint-config-html": "1.1.0", 56 | "stylelint-config-prettier": "9.0.5", 57 | "stylelint-config-rational-order": "0.1.2", 58 | "stylelint-config-recommended-vue": "1.5.0", 59 | "stylelint-config-standard": "34.0.0", 60 | "stylelint-order": "6.0.3", 61 | "tailwindcss": "3.3.3", 62 | "ts-jest": "29.1.1", 63 | "typescript": "5.1.6", 64 | "vite": "4.4.8", 65 | "vite-plugin-html-env": "1.2.8", 66 | "vite-plugin-svg-icons": "2.0.1", 67 | "vue-eslint-parser": "9.3.1", 68 | "vue-tsc": "1.8.8", 69 | "vue3-jest": "27.0.0-alpha.2" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starkovsky/vue3-vite-ts/9e67e61f362fc8723b3be130e6798ffadca6c2a6/public/favicon.ico -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 35 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/starkovsky/vue3-vite-ts/9e67e61f362fc8723b3be130e6798ffadca6c2a6/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /src/http/index.ts: -------------------------------------------------------------------------------- 1 | import axios, { AxiosRequestConfig } from 'axios'; 2 | import qs from 'qs'; 3 | 4 | import { API_URL, isPROD } from '@/runtimeEnv'; 5 | 6 | const HTTPClient = axios.create({ 7 | baseURL: API_URL, 8 | }); 9 | 10 | HTTPClient.interceptors.response.use( 11 | (response) => { 12 | return response.data; 13 | }, 14 | (error) => { 15 | if (error.response?.status === 401 && isPROD) { 16 | alert('You are not authenticated'); 17 | } 18 | return Promise.reject(error); 19 | }, 20 | ); 21 | 22 | export const HTTPRequest = ( 23 | options: AxiosRequestConfig, 24 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 25 | ): Promise => { 26 | return HTTPClient.request({ 27 | ...options, 28 | paramsSerializer: (params) => { 29 | return qs.stringify(params, { 30 | arrayFormat: 'comma', 31 | encode: false, 32 | }); 33 | }, 34 | }); 35 | }; 36 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createPinia } from 'pinia'; 2 | import { createApp } from 'vue'; 3 | import { START_LOCATION } from 'vue-router'; 4 | 5 | import { router } from './router'; 6 | 7 | import App from '@/App.vue'; 8 | 9 | import 'virtual:svg-icons-register'; 10 | 11 | router.beforeEach(async (to, from, next) => { 12 | if (from === START_LOCATION) { 13 | try { 14 | } catch (error) {} 15 | } 16 | next(); 17 | }); 18 | 19 | const pinia = createPinia(); 20 | 21 | const app = createApp(App); 22 | 23 | app.use(router); 24 | app.use(pinia); 25 | 26 | app.mount('#app'); 27 | 28 | export { app }; 29 | -------------------------------------------------------------------------------- /src/router.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; 2 | 3 | const routes: RouteRecordRaw[] = [ 4 | { 5 | path: '/', 6 | component: () => import('./views/HomePage.vue'), 7 | }, 8 | { 9 | path: '/about', 10 | component: () => import('./views/AboutPage.vue'), 11 | }, 12 | ]; 13 | 14 | const history = createWebHistory(); 15 | 16 | const router = createRouter({ 17 | history, 18 | routes, 19 | }); 20 | 21 | export { router }; 22 | -------------------------------------------------------------------------------- /src/runtimeEnv.ts: -------------------------------------------------------------------------------- 1 | const isDEV = import.meta.env.DEV; 2 | const isPROD = import.meta.env.PROD; 3 | const MODE = import.meta.env.MODE; 4 | const APP_TITLE = import.meta.env.VITE_APP_TITLE; 5 | const API_URL = import.meta.env.VITE_API_URL; 6 | 7 | // eslint-disable-next-line no-console 8 | console.log('RUNTIME_ENV', { 9 | isDEV, 10 | isPROD, 11 | MODE, 12 | APP_TITLE, 13 | API_URL, 14 | }); 15 | 16 | export { isDEV, isPROD, MODE, APP_TITLE, API_URL }; 17 | -------------------------------------------------------------------------------- /src/stores/global.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | export const useGlobalStore = defineStore('global', { 4 | state: () => ({ 5 | counter: 0, 6 | }), 7 | actions: { 8 | increment() { 9 | this.counter++; 10 | }, 11 | decrement() { 12 | this.counter--; 13 | }, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /src/views/AboutPage.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /src/views/HomePage.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 49 | -------------------------------------------------------------------------------- /src/vue.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ImportMetaEnv { 4 | VITE_APP_TITLE: string; 5 | VITE_API_URL: string; 6 | } 7 | 8 | declare module '*.vue' { 9 | import { DefineComponent } from 'vue'; 10 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 11 | const component: DefineComponent<{}, {}, any>; 12 | export default component; 13 | } 14 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: ['./index.html', './src/**/*.{css,vue,js,ts,jsx,tsx}'], 3 | theme: { 4 | extend: {}, 5 | }, 6 | variants: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | }; 11 | -------------------------------------------------------------------------------- /tests/About.spec.ts: -------------------------------------------------------------------------------- 1 | import { shallowMount } from '@vue/test-utils'; 2 | 3 | import About from '@/views/AboutPage.vue'; 4 | 5 | describe('TheComponent.vue', () => { 6 | it('renders Test text', () => { 7 | const wrapper = shallowMount(About); 8 | 9 | expect(wrapper.html()).toContain('About Page'); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/Home.spec.ts: -------------------------------------------------------------------------------- 1 | import { createTestingPinia } from '@pinia/testing'; 2 | import { enableAutoUnmount, shallowMount, VueWrapper } from '@vue/test-utils'; 3 | 4 | const isDEV = false; 5 | const isPROD = true; 6 | const MODE = 'production'; 7 | const APP_TITLE = 'Test HomePage.vue'; 8 | const API_URL = 'http://localhost:5000/api'; 9 | 10 | import Home from '@/views/HomePage.vue'; 11 | 12 | let wrapper: VueWrapper; 13 | 14 | function createComponent() { 15 | return shallowMount(Home, { 16 | global: { 17 | plugins: [createTestingPinia()], 18 | }, 19 | }); 20 | } 21 | 22 | jest.mock('@/runtimeEnv', () => { 23 | return { 24 | isDEV, 25 | isPROD, 26 | MODE, 27 | APP_TITLE, 28 | API_URL, 29 | }; 30 | }); 31 | 32 | enableAutoUnmount(afterEach); 33 | 34 | describe('TheComponent.vue', () => { 35 | it('renders Test text', () => { 36 | wrapper = createComponent(); 37 | expect(wrapper.findAll('button').length).toBe(2); 38 | }); 39 | 40 | it('Test mocked runtimeEnv', () => { 41 | wrapper = createComponent(); 42 | 43 | expect(wrapper.find('#runtime-env-isDEV').text()).toBe(`${isDEV}`); 44 | expect(wrapper.find('#runtime-env-isPROD').text()).toBe(`${isPROD}`); 45 | expect(wrapper.find('#runtime-env-MODE').text()).toBe(MODE); 46 | expect(wrapper.find('#runtime-env-APP_TITLE').text()).toBe(APP_TITLE); 47 | expect(wrapper.find('#runtime-env-API_URL').text()).toBe(API_URL); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "jsx": "preserve", 8 | "sourceMap": true, 9 | "resolveJsonModule": true, 10 | "esModuleInterop": true, 11 | "baseUrl": ".", 12 | "lib": ["esnext", "dom"], 13 | "types": ["vite/client", "node", "jest"], 14 | "paths": { 15 | "@/*": ["src/*"] 16 | } 17 | }, 18 | "include": [ 19 | "src/**/*.ts", 20 | "src/**/*.d.ts", 21 | "src/**/*.tsx", 22 | "src/**/*.vue", 23 | "tests/**/*.ts" 24 | ], 25 | "exclude": ["node_modules", "dist", "tmp"] 26 | } 27 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | 3 | import vue from '@vitejs/plugin-vue'; 4 | import { visualizer } from 'rollup-plugin-visualizer'; 5 | import { defineConfig } from 'vite'; 6 | import VitePluginHtmlEnv from 'vite-plugin-html-env'; 7 | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; 8 | 9 | // https://vitejs.dev/config/ 10 | export default defineConfig({ 11 | plugins: [ 12 | vue(), 13 | createSvgIconsPlugin({ 14 | iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')], 15 | symbolId: 'icon-[dir]-[name]', 16 | }), 17 | visualizer({ 18 | filename: './tmp/bundle-visualizer.html', 19 | }), 20 | VitePluginHtmlEnv(), 21 | ], 22 | resolve: { 23 | alias: [{ find: '@', replacement: '/src' }], 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /wallaby.js: -------------------------------------------------------------------------------- 1 | module.exports = () => ({ 2 | autoDetect: true, 3 | }); 4 | --------------------------------------------------------------------------------