Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static files not being created after rebuild or second build #40

Open
gavinmcfarland opened this issue Sep 20, 2019 · 1 comment
Open

Comments

@gavinmcfarland
Copy link

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

  1. Create a build marko build
  2. Look in the dist folder and you will see static css and js files
  3. Run the build again marko build
  4. 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.

// package.json
{
  "scripts": {
+       "build": "rm -rf .cache/ && NODE_ENV=production marko-starter build",
    },
}
@gavinmcfarland
Copy link
Author

gavinmcfarland commented Sep 20, 2019

Issue #31 may be related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant