Cannot find an index in "/src/symbol" in d3-shape@1.2.2`
The issue appears to be that unpkg attempts to resolve an import for ./symbol?module from a non-existent /src/symbol/index.js file, rather than the existing /src/symbol.js file.
One solution to this is to simple rename the file /src/symbol.js to /src/symbols.js, and update /src/index.js appropriately.
I will make a PR for this solution shortly, and will reference this issue in that PR.
When trying to import
d3
from unpkg I get a 404 that appears to come fromd3-shape
.For example, try pasting this into an
index.html
file and opening it with a browser:When I open the above file in a browser I see this console message:
The offending import seems to be: https://unpkg.com/d3-shape@1.2.2/src/symbol?module. If you go to that URL this message appears:
The issue appears to be that unpkg attempts to resolve an import for
./symbol?module
from a non-existent/src/symbol/index.js
file, rather than the existing/src/symbol.js
file.One solution to this is to simple rename the file
/src/symbol.js
to/src/symbols.js
, and update/src/index.js
appropriately.I will make a PR for this solution shortly, and will reference this issue in that PR.