Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save safareli/8200eccaa6f3a90cf9888a1d2a5bee1b to your computer and use it in GitHub Desktop.
Save safareli/8200eccaa6f3a90cf9888a1d2a5bee1b to your computer and use it in GitHub Desktop.
{"dependencies":[{"name":"/Users/safareli/dev/foam/parcel-test/.sassrc.js","includedInParent":true,"mtime":1525365496252}],"generated":{"css":".A {\n color: black; }\n","js":""},"hash":"1721b8da4debc4bba73c21e436027add","cacheData":{}}
{"dependencies":[{"name":"/Users/safareli/dev/foam/parcel-test/.sassrc.js","includedInParent":true,"mtime":1525365496252}],"generated":{"css":".A {\n color: black; }\n\n.B {\n color: blue; }\n","js":""},"hash":"2a4f04fcf60cb739c591ddc5e4547a74","cacheData":{}}
{"dependencies":[{"name":"./A.scss","dynamic":true},{"name":"./B.scss","dynamic":true}],"generated":{"html":"<html>\n<head>\n <link href=\"/89a39074fb0ed2bbddd1d296ac7a0bc4.css\" rel=\"stylesheet\">\n <link href=\"/bcc175bb90a9765b1a836460033e1fd0.css\" rel=\"stylesheet\">\n</head>\n<body>\n hi\n</body>\n</html>\n"},"hash":"cfb58837fc34ea835a3052a6eb8dc86b","cacheData":{}}
module.exports = {};

Note, I have prefixed:

  • files from .cache folder with .cache_
  • files from dist folder with dist_

As folders are not supported in gist

issue

Issue is that dist_B.4bdc3a95.css contains contents of A.scss

If you remove .sassrc.js or use .sassrc with {} as contents then the issue is not present.

Why do I need .sassrc.js instead of .sassrc? as it's the way to depend on staff from node_modules or bower_components etc.. see parcel-bundler/parcel#39 (comment)

.A { color: black }
.B { color: blue }
.A {
color: black; }
.A {
color: black; }
.B {
color: blue; }
<html>
<head>
<link href="/A.92f5761e.css" rel="stylesheet">
<link href="/B.4bdc3a95.css" rel="stylesheet">
</head>
<body>
hi
</body>
</html>
<html>
<head>
<link href='A.scss' rel='stylesheet' />
<link href='B.scss' rel='stylesheet' />
</head>
<body>
hi
</body>
</html>
{
"name": "parcel-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"node-sass": "^4.9.0",
"parcel-bundler": "^1.7.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment