Skip to main content
Glama
esbuild.mjs1.7 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 /* global process */ /* global console */ import dotenv from 'dotenv'; import esbuild from 'esbuild'; import { writeFileSync } from 'fs'; dotenv.config({ quiet: true }); const options = { entryPoints: ['./src/index.ts'], bundle: true, platform: 'browser', loader: { '.ts': 'ts', '.tsx': 'tsx' }, resolveExtensions: ['.js', '.ts', '.tsx'], target: 'es2021', tsconfig: 'tsconfig.json', minifyWhitespace: true, minifyIdentifiers: false, minifySyntax: true, sourcemap: true, define: { 'import.meta.env.NODE_ENV': '"production"', 'import.meta.env.GOOGLE_AUTH_ORIGINS': `"${process.env.GOOGLE_AUTH_ORIGINS}"`, 'import.meta.env.GOOGLE_CLIENT_ID': `"${process.env.GOOGLE_CLIENT_ID}"`, }, external: [ '@mantine/core', '@mantine/hooks', '@mantine/notifications', '@mantine/react', '@medplum/core', '@medplum/fhir-router', '@medplum/mock', '@medplum/react-hooks', 'prop-types', 'react', 'react-dom', 'react-router', ], }; esbuild .build({ ...options, define: { ...options.define, 'import.meta.env': 'process.env', }, format: 'cjs', outfile: './dist/cjs/index.cjs', }) .then(() => writeFileSync('./dist/cjs/package.json', '{"type": "commonjs"}')) .catch((err) => { console.error(err); process.exit(1); }); esbuild .build({ ...options, format: 'esm', outfile: './dist/esm/index.mjs', }) .then(() => writeFileSync('./dist/esm/package.json', '{"type": "module"}')) .catch((err) => { console.error(err); process.exit(1); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server