Javascript 未在IIS服务器上加载Reactjs子目录
我在IIS服务器上的某个url上托管了一个应用程序A。我有另一个应用程序B(react应用程序),我想在url上托管它 我使用webpack来构建react代码 我在sw.js中得到了错误,即“错误响应状态”。我还使用React路由器建立路由。并且还更改了基本名称。但这不起作用 我在index.js中编写的代码如下:-Javascript 未在IIS服务器上加载Reactjs子目录,javascript,reactjs,iis,service-worker,Javascript,Reactjs,Iis,Service Worker,我在IIS服务器上的某个url上托管了一个应用程序A。我有另一个应用程序B(react应用程序),我想在url上托管它 我使用webpack来构建react代码 我在sw.js中得到了错误,即“错误响应状态”。我还使用React路由器建立路由。并且还更改了基本名称。但这不起作用 我在index.js中编写的代码如下:- const history = createBrowserHistory({ basename: '/b' }); <Switch> <Pri
const history = createBrowserHistory({ basename: '/b' });
<Switch>
<PrivateRoute exact path="/" component={ClaimsMainForm} />
<PrivateRoute exact path="/claims-dashboard" component={ClaimsDashboard} />
<PrivateRoute exact path="/claims-reports" component={ClaimsReports} />
<PrivateRoute exact path="/preauth-hosp/:operation?" component={PreAuthorizationHospForm} />
<PrivateRoute exact path="/preauth-tpa" component={PreAuthorizationTpaform} />
<PrivateRoute exact path="/preauth-coordinator" component={PreAuthorizationCoordinatorForm} />
<PrivateRoute exact path="/claims-cashless" component={CashlessClaimsForm} />
<Route exact path="/login" component={Login} />
<Route exact path="/privacy-policy" component={PrivacyPolicy} />
<Route path="/terms-and-conditions" component={TnC} />
<Route path="/disclaimer" component={Disclaimer} />
<Route component={NotFoundPage} />
</Switch>
const history=createBrowserHistory({basename:'/b'});
请帮忙 @Snehalata…你找到解决办法了吗?我也在为同样的问题而挣扎