Embedding in react, issue with fileattachments/babel

Has anyone tried embedding in a Next.js app? I’ve run into this error, even after using the custom Babel config. It seems to be a Webpack issue, but is related to fileAttachments.

Module parse failed: Unexpected token (9:211)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

Thanks for any help one could provide!

hi @elibenton for a Next.js app you probably want to try Mike’s solution, dowload and edit the soruce files, pointing FileAttachment links to the static file on your Next.js public/ folder

1 Like