A simple less-include triggers a deprecated-warning into the console - how to solve this issue?
Nobody has claimed this yet.
- Dominant language
- Less
- Stars
- 680
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
I don't know if I am just too stupid or the configuration system is buggy or a super secret special setting is unknown, but I got this error-message or "warning" in the console:
file-manager.js:30 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/
AFTER using a "shitty normal recommended "stylesheet.less" implementation like this one:
<link rel="stylesheet/less" type="text/css" href="myStyles.less" />
After studying your config-help for less, I assumed, I could just "disable" this warning in changing the logLevel from 1 into 0, but no - it won't work. So next thought, also changing the env-var into "production" - but no - it won't work.
While trying to find the reason for a "non-async-load-warning" while implementing a stupid "css" file (in this case it might be because of the "less" extension) I thought well, so just change the f* config-vars from "async: false" into "async: true" - but no, it won't work, so also changing the "fileAsync: false" into "fileAsync: true" - and well - no - it just changed from "one-console-warning-message" into a new, even more powerful "console-and-red-screen-warning-missing-file-message":
FileError: 'file:///D:/myWholePathGoesInHere/myStyles.less' wasn't found (0)
Weather the file, nor the filename, nor the position has changed - all what changed, was the "config-setting".
So next thought, I might need to implement the css file in a different way, like ie.
like this site here suggests: https://www.filamentgroup.com/lab/load-css-simpler/
but - you might guessed it: no - it won't work, instead, even more "console-messages" are popping up.
So my question is this:
As nice and as powerful less.js is - which settings in the config can be really used right now - or is there a secret enable config first setting I missed to make it work as expected, or did I miss a special implementation of the special less-file - all of which seems to be NOT documented ANYWHERE - at least I couldn't locate any helpful sentence for that specific settings in the documentation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration help for logLevel, env, async, and fileAsync, then reproduce the stylesheet.less setup and warnings described in the report. Done means the relevant settings and the supported Less stylesheet-loading approach are clearly documented, including the observed missing-file behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100