MCPcopy
hub / github.com/prisma/prisma / nodeRuntimeBuildConfig

Function nodeRuntimeBuildConfig

packages/client/helpers/build.ts:43–64  ·  view source on GitHub ↗
(targetBuildType: typeof TARGET_BUILD_TYPE, format: ModuleFormat)

Source from the content-addressed store, hash-verified

41
42// we define the config for runtime
43function nodeRuntimeBuildConfig(targetBuildType: typeof TARGET_BUILD_TYPE, format: ModuleFormat): BuildOptions {
44 return {
45 format,
46 name: targetBuildType,
47 entryPoints: ['src/runtime/index.ts'],
48 outfile: `runtime/${targetBuildType}`,
49 outExtension: getOutExtension(format),
50 bundle: true,
51 minify: shouldMinify,
52 sourcemap: 'linked',
53 emitTypes: ['library', 'client'].includes(targetBuildType),
54 external: ['@prisma/client-runtime-utils'],
55 define: {
56 NODE_CLIENT: 'true',
57 TARGET_BUILD_TYPE: JSON.stringify(targetBuildType),
58 // that fixes an issue with lz-string umd builds
59 'define.amd': 'false',
60 },
61 plugins: [noSideEffectsPlugin(/^(arg|lz-string)$/), nodeProtocolPlugin],
62 banner: format === 'esm' ? { js: NODE_ESM_BANNER } : undefined,
63 }
64}
65
66function wasmBindgenRuntimeConfig(
67 provider: DriverAdapterSupportedProvider,

Callers 1

Calls 3

noSideEffectsPluginFunction · 0.90
getOutExtensionFunction · 0.85
includesMethod · 0.80

Tested by

no test coverage detected