question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't load imported Less file 1) with a period in it's name and 2) without extension

See original GitHub issue

Hi,

I just upgraded from v1.3.0 to v1.3.3 and ran into an issue with importing a Less file named chained.banner.less. I always import Less files without an extension, ie. @import "chained.banner"; and apparently v1.3.3 guesses that .banner is the extension.

Swapping the period in the file name for a dash (ie. chained-banner.less), adding a non a-z character to the 2nd part of the file name (ie. chained.banner123.less) or adding the extension to the import (ie. @import "chained.banner.less";) seemed valid workarounds.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
seven-phases-maxcommented, Mar 7, 2018

@r-wettstaedt It was not a bug then and it’s not a bug now. Less is not supposed to auto-append less extension in this case because the name already looks like having a one (= min). See File Extensions for more details. The proper import should be:

@import 'fileB.min.less';

in this case.

Note the (less) option is implied by default, it’s implicitly required only when the extension of the imported file directly assumes another importing behaviour (e.g. foo.css). And neither of importing options affect the auto-appending of extensions, i.e. it’s always: foo -> foo.less foo.bar -> foo.bar foo.css -> foo.css foo.less -> foo.less etc. and so on regardless of any options after the @import statement. (The options control only how the file is imported and not what file name it has).

0reactions
robert-wettstaedtcommented, Mar 7, 2018

@seven-phases-max, thanks for your explanation. I guess I gotta talk to the plugin developers then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I import .less files into a single .less file?
I just tried this on my local environment, putting vars into vars.less and mixins into conf.less . The file structure similar to yours,...
Read more >
Review and troubleshoot import errors - Knowledge Base
Learn how to view and troubleshoot common errors that occur during record imports.
Read more >
Error message when you open or save a file in Microsoft Excel
If you are trying to open the file from your list of most recently used files on the File menu, make sure that...
Read more >
Chapter 14: SOLUTIONS TO TEXT PROBLEMS:
2. The price faced by a profit-maximizing firm is equal to its marginal cost ... Both allow firms or individuals to be monopolies...
Read more >
A Basic Guide to Exporting - International Trade Administration
the smaller the company, the less likely it is to export to more than one country. ... Did import growth occur even during...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found