@cloudflare/next-on-pages
Version:
`@cloudflare/next-on-pages` is a CLI tool that you can use to build and develop [Next.js](https://nextjs.org/) applications so that they can run on the [Cloudflare Pages](https://pages.cloudflare.com/) platform (and integrate with Cloudflare's various oth
9 lines (8 loc) • 439 B
text/typescript
/**
* Newer versions of esbuild try to resolve dynamic imports by crawling the filesystem for matching modules.
* This doesn't work with the code next-on-pages generates, because the modules don't necessarily exist on the filesystem.
* This forces esbuild _not_ to look for matching modules on the filesystem (because esbuild doesn't inline functions when minifying)
*/
export async function doImport(m: string) {
return import(m);
}