Files
speckle-server/packages/frontend/vite.config.js
T
Kristaps Fabians Geikins 83d8035dc2 chore: upgrade to eslint 9 (#2348)
* root + server

* frontend

* frontend-2

* dui3

* dui3

* tailwind theme

* ui-components

* preview service

* viewer

* viewer-sandbox

* fileimport-service

* webhook service

* objectloader

* shared

* ui-components-nuxt

* WIP full config

* WIP full linter

* eslint projectwide util

* minor fix

* removing redundant ci

* clean up test errors

* fixed prettier formatting

* CI improvements

* TSC lint fix

* 'buildBatch' needs to be async since some batch types (like Text) require it. Removed a disabled liniting rule from ObjLoader

* removed unnecessary void

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2024-06-12 14:38:02 +03:00

66 lines
1.5 KiB
JavaScript

import path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue2'
import Components from 'unplugin-vue-components/vite'
import { VuetifyResolver } from 'unplugin-vue-components/resolvers'
import gql from 'vite-plugin-simple-gql'
const port = '8080'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: {
transformAssetUrls: {
// defaults
video: ['src', 'poster'],
source: ['src'],
img: ['src'],
image: ['xlink:href', 'href'],
use: ['xlink:href', 'href'],
// support for vuetify components
'v-img': ['src']
}
}
}),
Components({
resolvers: [VuetifyResolver()],
dts: './src/type-augmentations/unplugin-components.d.ts'
}),
gql()
],
server: {
host: '127.0.0.1',
port,
hmr: {
port
}
},
resolve: {
alias: {
// eslint-disable-next-line no-undef
'@': path.resolve(__dirname, './src'),
// redirects lodash to lodash-es in prod build, for a reduced & tree-shaked bundle
lodash: 'lodash-es'
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
css: {
// https://vitejs.dev/config/#css-preprocessoroptions
preprocessorOptions: {
sass: {
additionalData: [
// vuetify variable overrides
'@import "@/sass/variables.scss"',
''
].join('\n')
}
}
},
optimizeDeps: {
include: ['vuetify', 'vuetify/lib']
}
})