MCPcopy
hub / github.com/triggerdotdev/trigger.dev / mockServerOnlyPlugin

Function mockServerOnlyPlugin

packages/cli-v3/src/utilities/build.ts:9–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { escapeImportPath } from "./windows";
8
9export function mockServerOnlyPlugin(): Plugin {
10 return {
11 name: "trigger-mock-server-only",
12 setup(build) {
13 build.onResolve({ filter: /server-only/ }, (args) => {
14 if (args.path !== "server-only") {
15 return undefined;
16 }
17
18 logger.debug(`[trigger-mock-server-only] Bundling ${args.path}`, {
19 ...args,
20 });
21
22 return {
23 path: args.path,
24 external: false,
25 namespace: "server-only-mock",
26 };
27 });
28
29 build.onLoad({ filter: /server-only/, namespace: "server-only-mock" }, (args) => {
30 return {
31 contents: `export default true;`,
32 loader: "js",
33 };
34 });
35 },
36 };
37}
38
39export function bundleTriggerDevCore(buildIdentifier: string, tsconfigPath?: string): Plugin {
40 return {

Callers 2

runBuildFunction · 0.90
compileProjectFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…