After running yarn run start, I inspect some css I want to change. Next to the CSS rule in the console is shown a url e.g. blob:http://localhost:3002/a1f86b01-b790-455c-b218-315904e0a32f - this isn’t helpful for me to be able to find the location of that CSS.
Yes am I missing something here as what you have in your screenshot is more like what I would expect to see - e.g. links to the location of the styles in the scss files. Any idea what might be the reason that for example where you have
I believe so far everything else is working as expected however, I’ve only just started exploring this version of sage in the current project I’m working on, so I’m pretty sure I will encounter further things on part of this learning curve.
Yes if I change something in a sass file then it rebuilds and shows in the browser. Where is the config for the sourcemaps - perhaps that is part of the problem?
I Just created an entirely fresh install of bedrock with sage and I still get the same problem. E.g. after doing yarn run start and inspect my css sourcemap appears to be broken - links are e.g. blob:http://localhost:3002/a1f86b01-b790-455c-b218-315904e0a32f. I am using MAMP pro and Chrome. OMG - it works in Firefox.
Is there a reason you’re using NPM instead of Yarn? The Sage 9 docs suggest you use Yarn and there’s a yarn.lock file included in the repository that NPM wouldn’t look at so maybe that explains these weird issues you’re having.
If I remember correctly, one of the advantages of Yarn is that you are guaranteed to get the exact same versions of packages while that’s not the case with NPM…
Oh, I might have done that by force of habit as I only just moved from an older sage using gulp bower npm to the master branch of sage with yarn. Having run npm install, is that likely to have broken anything? I have otherwise followed the docs https://github.com/roots/docs/blob/sage-9/sage/theme-development-and-building.md
That’s strange, I hoped it would be enough but maybe there’s something else still cached.
I don’t know if it has any impact but you could try deleting the .cache-loader folder and also the full dist folder (although it should be recreated each time you run a build). Then run yarn build again.
You could also try a completely fresh project and only use yarn this time.
By the way, which version of Chrome do you have? Is it up to date?
I will try deleting .cache-loader and the dist folder and run yarn build again.
version of chrome - Version 62.0.3202.89 (Official Build) (64-bit) auto updates are on.
I did try a fresh project last night but perhaps I also ran npm install without thinking about it, although I’m pretty sure I didn’t. I will doublecheck.
It seems to be a problem somewhere in the build process. It worked straight away for me (I’m using Laravel Valet instead of MAMP for my server but I don’t think that should make a huge difference).
Are you sure you have the very latest version of Sage from Github? How are you installing the theme? I used Composer and ran the installer:
Is that what you did too? I ask because my config.jsfile doesn’t have the paths hardcoded like yours - it is set relatively. Maybe we have slightly different versions…