No loader is configured for ".png"

✘ [ERROR] No loader is configured for ".png" files: static/pr.png

index.js:1:15:
1import pr from "./static/pr.png"
~~~~~~~~~~~~~~~~~


✘ [ERROR] Build failed with 1 error:

index.js:1:15: ERROR: No loader is configured for ".png" files: static/pr.png
✘ [ERROR] No loader is configured for ".png" files: static/pr.png

index.js:1:15:
1import pr from "./static/pr.png"
~~~~~~~~~~~~~~~~~


✘ [ERROR] Build failed with 1 error:

index.js:1:15: ERROR: No loader is configured for ".png" files: static/pr.png
How and where do I specify a loader for .png files?
3 Replies
Hello, I’m Allie!
Try adding
rules = [
{ type = "Data", globs = ["**/*.png"], fallthrough = true }
]
rules = [
{ type = "Data", globs = ["**/*.png"], fallthrough = true }
]
to your wrangler.toml
net-tech-
net-tech-OP2y ago
Thanks so much
Hello, I’m Allie!
No problem!
Want results from more Discord servers?
Add your server