Theme not loaded - Deployment on Vercel or AWS

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
anthony-be
Posts: 1
Joined: 26 Mar 2021, 23:39

19 May 2021, 18:33

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.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

31 May 2021, 13:38

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,

dougdx
Posts: 3
Joined: 05 Oct 2019, 11:35

14 Sep 2021, 10:30

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?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

19 Apr 2022, 02:36

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,

Post Reply

Return to “Diamond - PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests