Gatsby webpack can not load topojson
or csv
with D3
#31764
-
DescriptionGatsby can't load topojson file. Steps to reproducehttps://laughing-golick-8189af.netlify.app/ navigate to /d3-hello-world, note that D3 works navigate to /topojson-page, note that topojson can not be loaded (doesn't seem to matter where you put the file -- static folder or in the component folder next to the component). This line is supposed to load the data, but is unable to load the file.
Minimal repro in Gatsby on Github here. Using dynamic import syntax like this didn't work either. :
Expected resultThis is a working example in CRA Actual resultIf passing
here's the error:
If using ES modules and
this is the error:
when loading the
here's the error:
Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answer: Don't host the files locally. Host the files elsewhere. |
Beta Was this translation helpful? Give feedback.
Answer:
Don't host the files locally. Host the files elsewhere.