-
Notifications
You must be signed in to change notification settings - Fork 920
Description
I'm using these library versions:
ReactJS.NET
: 5.2.4JavaScriptEngineSwitcher
: ChakraCore 3.5.6react
andreact-dom
: N/Awebpack
: N/Anode
: N/A
Runtime environment:
- OS: Windows server 2016 64 bit
- .NET Framework 4.7.2
Steps to reproduce
Our internal application is hosted at https://[OUR_BASE_URL]/[REACT_APPLICATION_NAME], with another webapplication being hosted at https://[OUR_BASE_URL].
I've followed the tutorial and have implemented the Asset manifest handling step.
Everything works while using localhost, but scripts can't be found on the production website after publishing the application.
Scripts and stylesheets are generated relative to https://[OUR_BASE_URL]/ instead of https://[OUR_BASE_URL]/[REACT_APPLICATION_NAME]/ (e.g. <script src="/dist/main.f9cc162b.js"></script> instead of <script src="/[REACT_APPLICATION_NAME]/dist/main.f9cc162b.js"></script>).
Seems like the ~ in SetReactAppBuildPath("~/dist") isn't properly being converted to [REACT_APPLICATION_NAME] like it does for <script src="~/js/site.js"></script> inside the _Layout.cshtml.
I've found threads that say you have to specify "homepage": "." or "./" inside package.json, but this doesn't seem to be doing anything.