score:1
Accepted answer
the dot in ./config.js
denotes a url relative to the current path. i.e. a document served from /profile/profileid
will request the file /profile/profileid/config.js
- which doesn't exist.
to specify that a partial url always be from the root, you should omit the dot.
<script src="/config.js"></script>
Source: stackoverflow.com
Related Query
- React app not loading js file when accessing it with a non home page url
- React app showing page with "404 the requested path could not be found" when using Apache
- React app is not rendering at all when loading HTML page that contains it
- Images not loading in React app with Webpack despite having file loaders (url-loader)
- Redirect to home when React app served by S3 is called with url containing a route
- Is there a way to tell when your react app page is done loading the page / assets?
- react-i18next not loading json translation files in React app created with create-react-app
- React router is not reloading page when url matches the same route
- URL changes but page new page is not rendered Ionic React , IonReactRouter with history
- Unicode characters not showed when bundling and deploying React app with webpack and babel
- Nextjs custom 404 page not showing when accessing invalid url in netlify
- React js Router changes url but not loading page
- App doesn't run when exporting react & react-router to a stand alone html file with webpack
- React components not rendering when routing to new page with react-router-dom v6
- react app loading asset from incorrect file path when accessed from nested route
- Why does my react app go to the custom 404 not found page when the link is clicked?
- When I try to register a service worker file in react app it will give me a reference error: navigator is not defined
- 404 Not Found error in preflight OPTIONS when executing a PUT method in CakePHP API with axios in React App
- I have this `div` on my home page and want it to move with me when I scroll, I am using react for the website btw
- Getting API URL from the External File which is not a part of the React app
- `require is not defined` error when using electron with a react app
- File not found error when trying to 'fetch' json in React App
- URL is updating but page is not redirecting in react app
- React Routing: URL is changing but page is not loading
- Image file cannot be found when using URL loader of webpack with React & Django
- Images not loading in React app when deployed on Heroku
- Page content is not loading after redirect - React web app
- while building infinite loading via API in REACT , the page number is not updating in console even when i scroll down a lot
- my page is not rendering with different id on the same page when i use link in react components
- Netlify blank page when refresh url with more than one path param using react router
More Query from same tag
- <Script> render every page NEXTJS
- Better type annotations for function props with flow
- Read data about specific element in a list
- Downshift: Set inputValue to value of currently highlighted item on keyboard navigation
- Parsing error: Unexpected token, expected "{" not sure why
- react-facebook-login does not working after open website from facebook app
- Webpack React error: Module parse failed: Unexpected token
- Why the data from my object is not setting to my setState in my react class component
- How a script with type "text/babel" is transpiled when put on the HTML page?
- React component render twice using useState
- Hide email in Stripe Checkout
- How to use overflow: hidden and make elements overflow on top without using position: absolute?
- React onClick event yields: "Uncaught TypeError: Cannot read property of undefined", despite binding
- Trying to align the text area and the button side by side
- When a prop is changing const is backing to its initial values
- How to add key to React Component object
- Reset multiselect drop-down menu react
- What is the best way to use a list as a key in JavaScript?
- React js useReducer hook in forms controlled inputs
- filter Graphql result by a Date variable
- How to pass child element to parent in React
- userEvent.type not updating value of input in test
- TypeError when accessing window.google on Next.js
- Error on archiving react native app in Xcode - Multiple commands produce 'libyoga.a'
- How to send date to child components in next using getStatisticProps?
- How to get parameters through component on react-router-dom-6
- Using Photo Sphere Viewer with React
- Page title in stateless functional components
- Some styles from styled-components not applying when view with mobile device
- How to verify my domain with Apple in a React App