Page 1 of 1

Theme not loaded - Deployment on Vercel or AWS

Posted: 19 May 2021, 18:33
by anthony-be
Hello,

I tried to deploy the template on Vercel and AWS Amplify. The deployment goes well but when I open the site, CSS styles (from public folder) do not load.

When I check the Network tab of Chrome, I see that following files are not loaded:

* /assets/theme/blue/theme-light.css
* /assets/layout/css/layout-light.css

The response for each of these requests corresponds to the content of /index.html

On local deployment (npm run build && server -s build), all is working fine.
For css imported in App.js, no problem at all.

Is there something that I need to do in order to make these theme to work ?
Like do not leave theme.css in public folder but move them to src and import them in App.js ?

Thanks in advance for your help,
Anthony.

Re: Theme not loaded - Deployment on Vercel or AWS

Posted: 31 May 2021, 13:38
by mert.sincan
Sorry for the delayed response!
Like do not leave theme.css in public folder but move them to src and import them in App.js ?
- Yes, you can do it. We have added theme and layout files under the public file to show the change of themes to the user only at run time. You can import them under the src file according to your requirement.

Best Regards,

Re: Theme not loaded - Deployment on Vercel or AWS

Posted: 14 Sep 2021, 10:30
by dougdx
I had the same issue, however when I tried to copy and paste the SCSS in the source folder, the production build was still not looking like expected - specifically around the theme layouts.

What do I need to do create a a production build with all of the css generated?

Re: Theme not loaded - Deployment on Vercel or AWS

Posted: 19 Apr 2022, 02:36
by mert.sincan
Hi,

Is this problem resolved? Can you import any custom scss file instead of theme scss?

Exp;

Code: Select all

/* test.scss */
body {
	display: none !important
}
Does it work in production?

Best Regards,