vue-developer-profile
vue-developer-profile copied to clipboard
Css not added to head when running develop
Hello,
First of all thank you for this great template, I have never used Gridsome, and I have to admit, it's nice !
I have a problem where when i run "npm run build", and get my files inside the "dist" folder, the scripts and css are not added in the index.html and the page doesnt look as its supposed to..
I have confirmed that this is the issue since it works when I manually place the
Is there any additionnal step I have missed to "tell gridsome to use css ? "
Thank you
Hi,
What the console output returns when running npm run build ?
Hello,
Thank you for your response, here is the console output :
$ npm run build
> resume@ build C:\Users\Me\Documents\Developer profile\vue-developer-profile\vue-developer-profile
> gridsome build
Gridsome v0.7.0
Initializing plugins...
Load sources - 0.12s
Create GraphQL schema - 0.05s
Create pages and templates - 0.02s
Generate temporary code - 0.02s
Bootstrap finish - 1.88s
Compile assets - 14.77s
Execute GraphQL (2 queries) - 0s
Write out page data (2 files) - 0s
Render HTML (2 files) - 0.45s
Process files (0 files) - 0s
Process images (14 images) - 1.48s
Done in 19.25s
The "head" tag in the dist folder doesn't contain any links to css/js..
I had a similar issue with the portfolio images.
I fixed it by clearing the cache npm cache clean --force and updating npm to the latest version. npm install -g npm@latest .
Backup your project first and give it a try. Furthermore, make sure to have global css in src/main.js and that the path is well defined.
Still nothing, for reference, here is how it looks on my browser once I build the project :

As you can see there are no styles... the <head> tag inside of the index.html is empty..
Something must be missing. Would be good to have further details about your environnement config and how you set up Gridsome and npm for local development.
npm - 6.14.8 node - v12.18.2
I didnt touch the settings, used it like it was out of the box from the git repo