Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

2.3 KB
Raw Blame
import { fileURLToPath } from 'node:url';
import tailwind from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import solidSvg from 'vite-plugin-solid-svg';
import tsconfigPaths from 'vite-tsconfig-paths';

const directory = fileURLToPath(new URL('.', import.meta.url));
const webDirectory = fileURLToPath(new URL('../../../../', import.meta.url));
const workspaceDirectory = fileURLToPath(
  new URL('../../../../../../', import.meta.url)
);

const previewAdapters = `${directory}/preview-adapters.tsx`;
const previewImports = [
  '@queries/calendar/calendars',
  '@queries/calendar/join-requests',
  '@queries/calendar/mutations',
  '@components/app/split-layout/layout',
  '@app/features/calendar-view/components/use-open-event-composer',
  '@app/features/calendar-view/components/use-forward-event-email',
  '@app/features/calendar/hooks/create-guest-invite-controller',
  '@app/features/calendar/hooks/use-calendar-ui-flag',
  '@app/features/calendar-view/components/use-open-event-email',
  '@app/features/calendar-view/copy-guest-emails',
  '@property/editors/selectors/PropertyEntitySelector',
  '@app/features/calendar-team/components/team-event-details',
  '@app/features/calendar/views/event-replacement',
  '@app/features/calendar-view/copy-event-mention',
  '@app/features/calendar-view/download-event-ics',
  '@core/component/LexicalMarkdown/component/core/BlockLink',
  '@core/component/UserIcon',
  '@core/component/Toast/Toast',
  '@core/user/combinedRecipient',
  '@core/user',
  '@entity/owner/owner-display',
  '../utils/calendar-description',
  '../../calendar/hooks/create-calendar-rsvp-controller',
];

/**
 * The real event details popover and drawer, and their guest editors, with
 * sample data and preview services.
 */
export default defineConfig({
  root: directory,
  cacheDir: `${directory}/.vite`,
  plugins: [
    solidPlugin(),
    solidSvg({ defaultAsComponent: true }),
    tsconfigPaths({ projects: [`${webDirectory}/tsconfig.json`] }),
    tailwind(),
  ],
  resolve: {
    dedupe: ['solid-js'],
    alias: previewImports.map((find) => ({
      find,
      replacement: previewAdapters,
    })),
  },
  server: {
    host: '127.0.0.1',
    port: 3096,
    strictPort: true,
    fs: { allow: [workspaceDirectory] },
  },
});