Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Link Not Shared on other html pages #3020

Closed
sr-webcode opened this issue May 13, 2019 · 5 comments
Closed

CSS Link Not Shared on other html pages #3020

sr-webcode opened this issue May 13, 2019 · 5 comments

Comments

@sr-webcode
Copy link

🐛 bug report

I have two html pages:
index.html
about.html

both html files share the same script reference:
<script src="./app.js">

Inside app.js, i have one file import , which is the scss file
"import "./style.scss";"

However upon running:
"parcel *.html"

Only about.html has the stylesheet tag.

Am I missing something? Kindly guide me, I'm new to bundlers.

🎛 Configuration (.babelrc, package.json, cli command)

{
"name": "Tutorial",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"init": "parcel *.html --no-source-maps --out-dir ./output"
},
"keywords": [],
"author": "srwebcode",
"license": "MIT",
"devDependencies": {
"sass": "^1.20.1"
}
}

{
  "your": { "config": "here" }
}

🤔 Expected Behavior

Both index.html and about.html should have

😯 Current Behavior

Only about.html has the style tag:

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel
Node
npm/Yarn
Operating System
@mischnic
Copy link
Member

Unfortunately this is a known bug in Parcel itself, tracked by #2340, and will be resolved in Parcel 2.

@sr-webcode
Copy link
Author

Thanks mischnic!, glad to know.
Are there any workarounds for this for the time being?

@mischnic
Copy link
Member

  • Creating a symlink called style2.scss and pointing that to style.scss might work.
  • Process both html files seperately (if there are not <a href> between them): parcel index.html and then parcel about.html

@sr-webcode
Copy link
Author

Alright!

Thanks once again!

@etsadhakal
Copy link

Is this bug solved ? seems not to me it doesnot worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants