Search code examples
sassparceljs

Parcel JS - not wrapping background-image url in single quotes


I'm using Parcel JS to do some simple SCSS compilation. On the Parcel live server everything looks fine, but when running the build command (in my case parcel build index.html --public-url ./) my background-images from the SCSS file are broken.

It seems as though even though the image is in single quotes e.g. background-image: url('images/image.jpg');, these are being removed on build and causing Chrome to think the image is an invalid property.

Is there any way to avoid this behaviour?


Solution

  • After not receiving an answer I think I've managed to solve the problem. This seems to be one of two issues.

    1. Out of date version of SASS (just a simple npm update)
    2. It not liking files with spaces in - simply rename any times.