I'm trying to use parcel.js and scss to usea background-image but getting a Uncaught SyntaxError: Unexpected token < 7d6454d814b6ce2e1592d3937c337ef3.js:1 Error
Or at times getting: Cannot read property 'js' of null
Here is my scss:
.hero{
background-image: url('../../images/2ndpaper.jpg');
}
Here is my js:
import "../styles/index.scss";
import paperbg from "../images/2ndpaper.jpg";
Here is my package.json:
{
"name": "development",
"version": "1.0.0",
"description": "CB PC - Web Development",
"main": "index.js",
"scripts": {
"dev": "parcel src/index.html",
"build": "parcel build src/index.html --out-dir prod"
},
"keywords": [
"client",
"website"
],
"author": "Designs by Harp",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"parcel-bundler": "^1.11.0"
},
"dependencies": {
"bootstrap-4-grid": "^2.4.1",
"gsap": "^2.0.2",
"jshint": "^2.10.1",
"sass": "^1.17.2"
}
}
What could be wrong? Thank you.
Aucun commentaire:
Enregistrer un commentaire