FTP deployment and .scss #8570
-
Hello everybody, I am new to statamic and am trying to deploy my site to a shared hosting via FTP. I can npm run dev and npm run build locally without an issue. But when I upload it to the FTP: http://aky-p.rcbr.ch/ it tries to fetch the site.scss file. Should a production site not only serve the compiled files in the /public/build directory? I feel like I am missing out on some very essential information. I can't seem to find any ressources on it either. I am using the peak starter kit and added sass to it. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Let's see your layout file and your Vite config. |
Beta Was this translation helpful? Give feedback.
-
You should run |
Beta Was this translation helpful? Give feedback.
-
So I can access /cp but clearing all caches in the Utilities did not work either. The issue seems to be that it tries to fetch: when it should be fetching:
The .env on the server says production and debug=false but I still see the debug bar on production. |
Beta Was this translation helpful? Give feedback.
-
I solved the issue. In my layout.antlers.html I added:
and I created the tag like this: namespace App\Tags;
} |
Beta Was this translation helpful? Give feedback.
I solved the issue. In my layout.antlers.html I added:
<link rel="stylesheet" href="{{ vite:asset src="resources/css/site.scss" }}"> <script src="{{ vite:asset src="resources/js/site.js" }}"></script>
and I created the tag like this:
`<?php
namespace App\Tags;
use \Statamic\Tags\Tags;
class ViteAssets extends Tags
{
protected static $handle = 'vite';
}
`