Images Url are broken when building with a baseUrl #1819
Unanswered
MTG2000
asked this question in
Troubleshooting
Replies: 1 comment 8 replies
-
I can't reproduce in Snowpack latest. In Create Snowpack App (React) I see this:
Can you share what steps I could take to make this change? What does the source import look like, and what does your entire config file look like? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have always used webpack previously but decided to try out snowpack with a test project
I liked it so much this far, but when I came to building & deployment .... problems appeared :(
I have been struggling for hours with an issue related to images paths.
I have a react project, where I have a component that imports images from src/assets folder.
I also have a baseUrl cause my app is hosted at "mtg2000.github.io/my-app", so in the buildOptions I have a "baseUrl":'/my-app/" and it is working for all the js files, but......
all images assets seem to ignore the baseUrl after building.
so in any .png.proxy.js file, the exported file is "/dist/assets/image.png"; when it should be "my-app/dist/assets/image.png"
is this an issue with the bundler ?? or is there another place to put the baseUrl in to work for images ????
please help, cause I have been trying to deploy my app on github pages for the entire day without success.
Thank you in advance 🙏🙏
Beta Was this translation helpful? Give feedback.
All reactions