# Embedding in react, issue with fileattachments/babel

**URL:** <https://talk.observablehq.com/t/embedding-in-react-issue-with-fileattachments-babel/4169>\
**Category:** Help\
**Created:** [November 18, 2020, 4:25pm UTC](https://talk.observablehq.com/t/embedding-in-react-issue-with-fileattachments-babel/4169 "2020-11-18T16:25:27Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![elibenton](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/elibenton/32/2615_2.png) [@elibenton](https://talk.observablehq.com/u/elibenton)\
**Post date:** [November 23, 2020, 8:26pm UTC](https://talk.observablehq.com/t/embedding-in-react-issue-with-fileattachments-babel/4169/22 "2020-11-23T20:26:02Z")

</div>

Has anyone tried embedding in a Next.js app? I’ve run into this error, even after using the [custom Babel config](https://nextjs.org/docs/advanced-features/customizing-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!

---

<div class="post-metadata">

**Author:** ![radames](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/radames/32/1699_2.png) [@radames](https://talk.observablehq.com/u/radames)\
**Post date:** [November 24, 2020, 12:19am UTC](https://talk.observablehq.com/t/embedding-in-react-issue-with-fileattachments-babel/4169/23 "2020-11-24T00:19:58Z")

</div>

hi @elibenton for a Next.js app you probably want to try [Mike’s solution](https://github.com/observablehq/react-zoomable-sunburst), dowload and edit the soruce files, pointing FileAttachment links to the static file on your Next.js **public/** folder

> **[observablehq/react-zoomable-sunburst](https://github.com/observablehq/react-zoomable-sunburst)**
>
> create-react-app + observablehq. Contribute to observablehq/react-zoomable-sunburst development by creating an account on GitHub.

[Previous page](https://talk.observablehq.com/t/embedding-in-react-issue-with-fileattachments-babel/4169.md?page=1)
