storj/web/satellite/vite.config-vuetify.js
Jeremy Wharton ad13cb2bf5 web/satellite, satellite/analytics: add UI type to analytics properties
This change incorporates the UI type (legacy or Vuetify) in the
properties attached to analytics events originating from the satellite
UI.

Resolves #6363

Change-Id: Ie3627bc24e4349407376e28460a5a830d211b47b
2023-10-13 11:43:54 +00:00

58 lines
1.6 KiB
JavaScript

// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
import { fileURLToPath, URL } from 'node:url';
import vue from '@vitejs/plugin-vue';
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
base: '/static/dist_vuetify_poc',
plugins: [
vue({
template: { transformAssetUrls },
}),
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
vuetify({
autoImport: true,
styles: {
configFile: 'vuetify-poc/src/styles/settings.scss',
},
}),
],
define: {
'process.env': {},
__UI_TYPE__: JSON.stringify('vuetify'),
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@poc': fileURLToPath(new URL('./vuetify-poc/src', import.meta.url)),
'stream': 'stream-browserify', // Passphrase mnemonic generation will not work without this
},
extensions: [
'.js',
'.json',
'.jsx',
'.mjs',
'.ts',
'.tsx',
'.vue',
],
},
build: {
outDir: fileURLToPath(new URL('dist_vuetify_poc', import.meta.url)),
emptyOutDir: true,
rollupOptions: {
input: {
'vuetify-poc': fileURLToPath(new URL('./index-vuetify.html', import.meta.url)),
},
},
},
server: {
port: 3000,
},
});