/opt/canhelp/node_modules/next/dist/esm/build
NameSizeModeActions
adapter/-0755rm
analysis/-0755rm
babel/-0755rm
manifests/-0755rm
next-config-ts/-0755rm
output/-0755rm
polyfills/-0755rm
segment-config/-0755rm
static-paths/-0755rm
swc/-0755rm
templates/-0755rm
turbopack-build/-0755rm
turborepo-access-trace/-0755rm
webpack/-0755rm
webpack-build/-0755rm
webpack-config-rules/-0755rm
after-production-compile.js16220644editdlrm
after-production-compile.js.map31390644editdlrm
build-context.js13530644editdlrm
build-context.js.map40560644editdlrm
collect-build-traces.js215980644editdlrm
collect-build-traces.js.map353920644editdlrm
compiler.js28840644editdlrm
compiler.js.map47860644editdlrm
create-compiler-aliases.js245640644editdlrm
create-compiler-aliases.js.map399610644editdlrm
define-env.js143350644editdlrm
define-env.js.map231660644editdlrm
deployment-id.js2180644editdlrm
deployment-id.js.map5060644editdlrm
duration-to-string.js5440644editdlrm
duration-to-string.js.map10840644editdlrm
entries.js362600644editdlrm
entries.js.map616600644editdlrm
generate-build-id.js7940644editdlrm
generate-build-id.js.map11980644editdlrm
get-babel-config-file.js6220644editdlrm
get-babel-config-file.js.map11000644editdlrm
get-babel-loader-config.js29370644editdlrm
get-babel-loader-config.js.map48850644editdlrm
handle-entrypoints.js45710644editdlrm
handle-entrypoints.js.map70760644editdlrm
handle-externals.js136230644editdlrm
handle-externals.js.map216530644editdlrm
index.js1472390644editdlrm
index.js.map2255750644editdlrm
is-writeable.js2620644editdlrm
is-writeable.js.map6350644editdlrm
load-entrypoint.js17000644editdlrm
load-entrypoint.js.map30980644editdlrm
load-jsconfig.js34510644editdlrm
load-jsconfig.js.map65080644editdlrm
next-dir-paths.js3010644editdlrm
next-dir-paths.js.map6810644editdlrm
normalize-catchall-routes.js41950644editdlrm
normalize-catchall-routes.js.map66430644editdlrm
page-extensions-type.js610644editdlrm
page-extensions-type.js.map1800644editdlrm
preview-key-utils.js34080644editdlrm
preview-key-utils.js.map59660644editdlrm
progress.js29490644editdlrm
progress.js.map45880644editdlrm
rendering-mode.js6180644editdlrm
rendering-mode.js.map7110644editdlrm
spinner.js28690644editdlrm
spinner.js.map49330644editdlrm
type-check.js52780644editdlrm
type-check.js.map92510644editdlrm
utils.js538060644editdlrm
utils.js.map953930644editdlrm
webpack-config.js1084980644editdlrm
webpack-config.js.map1582060644editdlrm
worker.js2060644editdlrm
worker.js.map4810644editdlrm
write-build-id.js3310644editdlrm
write-build-id.js.map7430644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/build/load-entrypoint.js (1700B)
import fs from 'fs/promises'; import path from 'path'; import { loadBindings } from './swc'; // NOTE: this should be updated if this loader file is moved. const PACKAGE_ROOT = path.normalize(path.join(__dirname, '../..')); const TEMPLATE_SRC_FOLDER = path.normalize(path.join(__dirname, './templates')); const TEMPLATES_ESM_FOLDER = path.normalize(path.join(__dirname, '../../dist/esm/build/templates')); /** * Load the entrypoint file from the ESM directory and performs string * replacements of the template variables specified in the `replacements` * argument. * * For non-string replacements, the template should use the * `declare const ${key}: ${type}` syntax. to ensure that the type is correct * and the typescript can compile. You may have to use `@ts-expect-error` to * handle replacement values that are related to imports. * * @param entrypoint the entrypoint to load * @param replacements string replacements to perform * @param injections code injections to perform * @param imports optional imports to insert or set to null * @returns the loaded file with the replacements */ export async function loadEntrypoint(entrypoint, replacements, injections, imports) { let bindings = await loadBindings(); const templatePath = path.resolve(path.join(TEMPLATES_ESM_FOLDER, `${entrypoint}.js`)); let content = await fs.readFile(templatePath); return bindings.expandNextJsTemplate(content, // Ensure that we use unix-style path separators for the import paths path.join(TEMPLATE_SRC_FOLDER, `${entrypoint}.js`).replace(/\\/g, '/'), PACKAGE_ROOT.replace(/\\/g, '/'), replacements, injections ?? {}, imports ?? {}); } //# sourceMappingURL=load-entrypoint.js.map