Expose contents of @sveltejs/app-utils
as CJS as well as ESM
#592
Labels
adapters - general
Support for functionality general to all adapters
Opening this for feedback before I go ahead and add the build step, but it looks like we can't use commonjs in adapters and then depend on esm modules such as
@sveltejs/app-utils
if we expect anything to work.This sort of thing:
relies on the exports map present in
@sveltejs/app-utils
:However this needs to be modified to allow
require
to access these exports too:This then causes the following error:
So it looks like we need to build app-utils for
cjs
andesm
in order that it can be used with both types of module.Happy to go ahead and do this and then fix the
vercel
andbegin
adapters accordingly if I'm not missing something.The text was updated successfully, but these errors were encountered: