-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Error when scss file is empty #327
Comments
I just took to play around with the latest version and I end up with not working HRM, apparently. When scss has been changed the process either stops or changes are not visible unless I refresh the page. It happens also if I make some big changes, for example, refactoring (incl. npm modules installation) from simple js file to react based 'hello world'. Complete re-run |
@nnnikolay I’m not really understanding how that applies to this issue... @gongpeione Wow great catch! This definetly needs to get fixed. Can you please make a PR? |
@davidnagli sorry if it's not, I just started with an empty file as well, and then almost every file creation, module installation etc... leads me to the Error, I thought it might be connected. But later I've found more relevant #315. Sorry. |
Is there a valid use case for an empty sass file, or are we solving for an edge case here? |
@brandon93s Looks like an edge case 🐳 |
@brandon93s it is definitely a bug. An importer should be able to handle empty files unless empty files are invalid by the file type specification. it may be an edge case in daily development, but considering the trouble that it causes and the little effort that it takes to solve it, I would definitely take the change. If this helps 50 people each save 30 minutes of pointless debugging, it's worth it. And since it is a bug, what is the alternative. Add an info to the docs that one particular loader in parcel can't deal with empty files, so please don't do that? |
I don't disagree, I just think this should be solved to handle all empty assets. The proposed solution fixed SASS only. I support empty asset handling at a higher level. |
Yes, I agree empty files should be handling at a higher level. |
Closing. Should be fixed by #340. |
Choose one: is this a 🐛 bug report or 🙋 feature request?
🐛 bug report
🤔 Expected Behavior
Built successful
😯 Current Behavior
Build failed,
No input specified: provide a file name a source string to process
💁 Possible Solution
pass a
space
when .scss file is empty🔦 Context
I know scss file is not empty normally, but I think maybe it should not show an error message when it is empty. And I can create a pr if you want.
The text was updated successfully, but these errors were encountered: