Grunt watch doesn't watch _theme.less and custom less filehow to compile single LESS file in magento2Configure Grunt to watch the overrided vendor module css - Magento2Magento 2 Theme - grunt watch with overridden module.scssMagento Grunt Less Compilation behaves weirdCan't modify style in custom theme using Gruntmagento 2 Grunt watch loads old css when changing imported css fileGrunt - is it possible to watch custome module less files?(Magento2) Grunt Less problem with a new themeGrunt, .less, and Live Reload - Can't get them workingImport new custom less files after grunt configuration
A Strange Latex Symbol
How could Tony Stark make this in Endgame?
How to stop co-workers from teasing me because I know Russian?
US visa is under administrative processing, I need the passport back ASAP
Will a top journal at least read my introduction?
How come there are so many candidates for the 2020 Democratic party presidential nomination?
How to creep the reader out with what seems like a normal person?
Is DC-DC (24v to 12v) Buck Conversion typically more efficient than AC-DC (110v to 12v) conversion?
How to have a sharp product image?
What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?
Unexpected email from Yorkshire Bank
Packing rectangles: Does rotation ever help?
Was is really necessary for the Lunar module LM to have 2 stages?
Controversial area of mathematics
Apply MapThread to all but one variable
Does Gita support doctrine of eternal samsara?
Mac Pro install disk keeps ejecting itself
Will tsunami waves travel forever if there was no land?
Uniformly continuous derivative implies existence of limit
Stop and Take a Breath!
Was there a Viking Exchange as well as a Columbian one?
Examples of subgroups where it's nontrivial to show closure under multiplication?
Binary Numbers Magic Trick
How much cash can I safely carry into the USA and avoid civil forfeiture?
Grunt watch doesn't watch _theme.less and custom less file
how to compile single LESS file in magento2Configure Grunt to watch the overrided vendor module css - Magento2Magento 2 Theme - grunt watch with overridden module.scssMagento Grunt Less Compilation behaves weirdCan't modify style in custom theme using Gruntmagento 2 Grunt watch loads old css when changing imported css fileGrunt - is it possible to watch custome module less files?(Magento2) Grunt Less problem with a new themeGrunt, .less, and Live Reload - Can't get them workingImport new custom less files after grunt configuration
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png
I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:
files: [
'css/styles-m',
'css/styles-l',
'css/local'
],
local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.
Any ideas?
Grunt less output:
Running "less:base" (less) taskFile pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B
UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.
magento2 error custom less grunt
magento2 error custom less grunt
edited Apr 13 '17 at 4:50
Jenith Samuel
218218
218218
asked Apr 12 '17 at 22:47
Max.AMax.A
286
286
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169953%2fgrunt-watch-doesnt-watch-theme-less-and-custom-less-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
add a comment |
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
Ok, my research finished and looks like that's M2 bug.
Details:
_theme.less have the @imports in the header and that's the problem. I made theme exec and got _theme.less file copy of the same size in /pub/static, not symlink. I removed all @imports, exec, I got zero size symlink to _theme.less for now. I repeated tests 3-4 times. 100% dependency.
Ok, going forward.
My existent @imports format:
@import '_buttons_extend';
format was changed to:
@import url('_buttons_extend');
That's the miracle, I got symlink for now.
Run grunt less:theme-name, got
File "pubstaticfrontendMaxThemebaseen_UScsssource_theme.less" changed.
Running "less:base" (less) task
FileError: '_buttons_extend.less' wasn't found in pubstaticfrontendMaxThemebaseen_UScsssource_theme.less on line 3, column 1:
2 @import '_vars';
3 @import '_buttons_extend';
4 @import 'components/_footer';
Warning: Error compiling pub/static/frontend/MaxTheme/base/en_US/css/styles-m.less Use --force to continue.
But _buttons_extend locates in the same directory as _theme.less. I posted my dir structure screenshot above. So that's two ways: to live with the exec or less/watch error. I prefer the first one. Just to keep @imports in _theme.less and reexec theme if I added some @import there.
answered Apr 13 '17 at 12:15
Max.AMax.A
286
286
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169953%2fgrunt-watch-doesnt-watch-theme-less-and-custom-less-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown