2023-08-29 16:20:27 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
// Plugins
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
|
|
|
|
|
|
// Utilities
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2023-08-31 14:22:08 +01:00
|
|
|
base: process.env.NODE_ENV === 'production' ? '/back-office/' : '/',
|
2023-08-29 16:20:27 +01:00
|
|
|
plugins: [
|
|
|
|
vue({
|
|
|
|
template: { transformAssetUrls }
|
|
|
|
}),
|
|
|
|
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
|
|
|
vuetify({
|
|
|
|
autoImport: true,
|
|
|
|
styles: {
|
|
|
|
configFile: 'src/styles/settings.scss',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
define: { 'process.env': {} },
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
|
|
},
|
|
|
|
extensions: [
|
|
|
|
'.js',
|
|
|
|
'.json',
|
|
|
|
'.jsx',
|
|
|
|
'.mjs',
|
|
|
|
'.ts',
|
|
|
|
'.tsx',
|
|
|
|
'.vue',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 3000,
|
|
|
|
},
|
2023-08-31 14:22:08 +01:00
|
|
|
build: {
|
|
|
|
outDir: "build"
|
|
|
|
}
|
2023-08-29 16:20:27 +01:00
|
|
|
})
|