You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting weird (and in my opinion wrong) behavior with static resources when I use custom server (on 2.0.0 Beta).
For example, if my custom server directs a request to "/blog/:id", then the static resources are being looked up in "./blog/static/image.jpg".
For easy reproduction, I've edited the render method of "blog" in "parameterized-routing":
return <div>
<h1>My {this.props.id} blog post</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
</p>
<img src="./static/x.jpg" />
</div>
And ofcourse added an image named "x.jpg" to "static" folder.
I can work it around by looking the file in "../static/x.jpg", but this is wrong since it exploits the fact that blog does not sit under index.js.
The text was updated successfully, but these errors were encountered:
I'm getting weird (and in my opinion wrong) behavior with static resources when I use custom server (on 2.0.0 Beta).
For example, if my custom server directs a request to "/blog/:id", then the static resources are being looked up in "./blog/static/image.jpg".
For easy reproduction, I've edited the render method of "blog" in "parameterized-routing":
And ofcourse added an image named "x.jpg" to "static" folder.
I can work it around by looking the file in "../static/x.jpg", but this is wrong since it exploits the fact that blog does not sit under index.js.
The text was updated successfully, but these errors were encountered: