Roots Discourse

Wrong link for CSS & JS on production server


#1

Hi, i am new and i finish my first project.
I build production and upload the project to hosting. I have problem 4 errors with missing CSS and JS files - respective wrong link - localhost/… from urlDev
What shall i do with it please ?


#2

We will need to see the errors, and know more about your hosting and upload method before we can help here.


#3

MWDelaney sorry…
problem is:

the link is via “devUrl”: “http://localhost/folderA” in config.json

  • production server is normal cheap hosting

When I finish my development I use these process

  1. yarn build:production
  2. composer install --no-dev
  3. I uploaded with help FTP and I uploaded folders

├── app/
├── config/
├── dist/
├── resources/
│ ├── views/
│ ├── functions.php
│ ├── index.php
│ ├── screenshot.jpg
│ └── style.css
|── vendor/
└── LICENSE.md

so what shall I do for correct function for development on localhost, but even for build to production?


#4

My first problem is solved
I changed URL in DB - in table options the fileds: siteurl, home
and everything is ok…

But I have another problem.
Some styles not function on prodcution. I dont understand why. I have @import “layouts/vertical-menu”;
And some class in _vertical-menu.scss are OK, but some classes are missing in created styles/main_575994a2.css after yarn build:production
so on localhost is everything ok and on production some cllases are missing.
Uf, can you help me?


closed #5

This topic was automatically closed after 42 days. New replies are no longer allowed.