Ghost/apps/admin-x-settings/vite.config.mjs
Aileen Booker c1ce322e86
Custom fonts (#21337)
- Adding custom fonts for themes behind a feature flag
- Introduces new `@tryghost/custom-fonts` module to manage custom fonts
- UI updates for Branding and Theme settings

---------

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Daniël van der Winden <danielvanderwinden@ghost.org>
2024-10-24 07:43:08 -04:00

35 lines
1.2 KiB
JavaScript

import adminXViteConfig from '@tryghost/admin-x-framework/vite';
import pkg from './package.json';
import {resolve} from 'path';
// https://vitejs.dev/config/
export default (function viteConfig() {
return adminXViteConfig({
packageName: pkg.name,
entry: resolve(__dirname, 'src/index.tsx'),
overrides: {
define: {
'process.env.DEBUG': false // Shim env var utilized by the @tryghost/nql package
},
resolve: {
// Shim node modules utilized by the @tryghost/nql package
alias: {
fs: 'node-shim.cjs',
path: 'node-shim.cjs',
util: 'node-shim.cjs',
// @TODO: Remove this when @tryghost/nql is updated
mingo: resolve(__dirname, '../../node_modules/mingo/dist/mingo.js')
}
},
optimizeDeps: {
include: ['@tryghost/kg-unsplash-selector', '@tryghost/custom-fonts']
}
},
build: {
commonjsOptions: {
include: [/ghost\/custom-fonts/]
}
}
});
});