mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
19da5c6af4
no issue - Adds the unsplash selector as a standalone typescript package inside the Koenig monorepo. - Currently we have 3 versions of the Unsplash Selector. One in Koenig-Lexical, one in AdminX and the original Ember version. - We can now start phasing out the application coupled version of the selector and replace it with the reusable version. - We can now import it via npm to any React application. - This commit removes the Unsplash components from AdminX and imports it instead. This is the second commit for this as the previous commit broke styles due to normalise styles leaking into the Ember app. Disabling preflight (https://github.com/TryGhost/Koenig/pull/1169) in Tailwind fixed it.
30 lines
1.0 KiB
JavaScript
30 lines
1.0 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']
|
|
}
|
|
}
|
|
});
|
|
});
|