mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-22 11:08:10 +00:00
39 lines
1006 B
JavaScript
39 lines
1006 B
JavaScript
// vite.config.js
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
import { generateAssetsPlugin } from './vitePlugins/generateAssetsPlugin.js';
|
|
|
|
export default defineConfig({
|
|
plugins : [react(), generateAssetsPlugin()],
|
|
resolve : {
|
|
alias : {
|
|
'@vitreum' : path.resolve(__dirname, './vitreum'),
|
|
'@shared' : path.resolve(__dirname, './shared'),
|
|
'@sharedStyles' : path.resolve(__dirname, './shared/naturalcrit/styles'),
|
|
'@navbar' : path.resolve(__dirname, './client/homebrew/navbar'),
|
|
'@themes' : path.resolve(__dirname, './themes'),
|
|
},
|
|
},
|
|
build : {
|
|
outDir : 'build',
|
|
emptyOutDir : false,
|
|
rollupOptions : {
|
|
output : {
|
|
entryFileNames : '[name]/bundle.js',
|
|
chunkFileNames : '[name]/[name]-[hash].js',
|
|
assetFileNames : '[name]/[name].[ext]',
|
|
},
|
|
},
|
|
},
|
|
define : {
|
|
global : 'window.__INITIAL_PROPS__',
|
|
},
|
|
server : {
|
|
port : 8000,
|
|
fs : {
|
|
allow : ['.'],
|
|
},
|
|
},
|
|
});
|