1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-05 08:45:41 -05:00

type check .js files

This commit is contained in:
2022-07-05 20:17:01 -04:00
parent 760f07cd11
commit c69a593d61
8 changed files with 216 additions and 195 deletions

View File

@@ -38,7 +38,7 @@ export const compileNote = async (slug: string): Promise<NoteWithSource> => {
// https://github.com/hashicorp/next-mdx-remote/pull/211#issuecomment-1013658514
// ...so for now, let's do it manually (and conservatively) with uglify-js when building for production.
const compiledSource =
process.env.NEXT_PUBLIC_VERCEL_ENV === "production"
process.env.IS_DEV_SERVER !== "true"
? minify(source.compiledSource, {
toplevel: true,
parse: {

View File

@@ -18,4 +18,4 @@ export const prisma =
log: ["query"],
});
if (process.env.NODE_ENV !== "production") global.prisma = prisma;
if (process.env.IS_DEV_SERVER === "true") global.prisma = prisma;