on 2023 Mar 03 8:24 PM
I just made a configuration for spartacus 4.3 and everything went well, but it turns out that when I enter the first time I request the styles from this URL
<code>https://localhost:4200/styles.css
The time I refresh it request them from this url
<code>https://localhost:4200/electronics-spa/en/USD/styles.css
So I don't know if it is entirely related to something of the base Url or where do I configure this to avoid the 404 error.
thanks!
Request clarification before answering.
Hello Bernhard Luecke
Sorry I'll try to be more specific, I have installed a local recipe of SAP Commerce 2105 as a Backend and added all the data for a local SAP Spartacus 4.3 storefront
Everything is running fine, but when I add url params I have some issues on reloading the page.
provideConfig({
context: {
baseSite: [
'electronics-spa', //Selected by default because it is the first element in the list
'electronics',
],
language: [
'en'
],
currency: [
'USD'
],
urlParameters: ['baseSite'],
},
} as SiteContextConfig),
The first time the url is https://localhost:4200/ so the site finds all the required assets such as JS files and styles files.
After Spartacus append url params the url changes https://localhost:4200/electronics-spa/en/USD/ and the website tries to find the styles file in that url so it returns a 404 as it doesn't find the file in that specific url.
My issue is that I must force spartacus, angular (at this point don't even know where the config goes) to take the assets from the root url and not a url that contains params such as the base site, currency or language.
If more details are needed please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesus,
I´d kindly suggest to add more specific tags, e.g. "SAP Commerce" or "SAP Commerce Cloud", then the chance of obtaining an answer is quite higher.
Regards
Bernhard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.