You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was struggling to understand what was going on when I was creating a build of my project. For my particular case, I managed to narrow it down to a few different issues. One of them is that when you run a second build, the static files do not get written to the dist folder when there is already a .cache folder present.
Steps to reproduce
Create a build marko build
Look in the dist folder and you will see static css and js files
Run the build again marko build
In the dist folder you will see there are no static css or js files
You can test this by deleting the .cache folder and running another build. The static files should be present again inside the dist folder.
Temporary fix
It's a bit nasty but it does the trick.
Be extra careful though using rm -rf.
Change the build script to remove the .cache folder before starting a build.
I was struggling to understand what was going on when I was creating a build of my project. For my particular case, I managed to narrow it down to a few different issues. One of them is that when you run a second build, the static files do not get written to the
dist
folder when there is already a.cache
folder present.Steps to reproduce
marko build
dist
folder and you will see static css and js filesmarko build
dist
folder you will see there are no static css or js filesYou can test this by deleting the
.cache
folder and running another build. The static files should be present again inside thedist
folder.Temporary fix
It's a bit nasty but it does the trick.
Be extra careful though using
rm -rf
.Change the build script to remove the
.cache
folder before starting a build.// package.json { "scripts": { + "build": "rm -rf .cache/ && NODE_ENV=production marko-starter build", }, }
The text was updated successfully, but these errors were encountered: