6555a68fa9
Serve the front-end sources of the new back-office through the current satellite admin server under the path `/back-office`. The front-end is served in the same way than the current one, which is through an indicated directory path with a configuration parameter or embed in the binary when that configuration parameter is empty. The commit also slightly changes the test that checks serving these static assets for not targeting the empty file in the build folder. build folders must remain because of the embed directive. Change-Id: I3c5af6b75ec944722dbdc4c560d0e7d907a205b8
49 lines
1022 B
JavaScript
49 lines
1022 B
JavaScript
// 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({
|
|
base: process.env.NODE_ENV === 'production' ? '/back-office/' : '/',
|
|
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,
|
|
},
|
|
build: {
|
|
outDir: "build"
|
|
}
|
|
})
|