Skip to content

Match less:dev filters to production build task #3802

@taylortom

Description

@taylortom

The two grunt/config/less.js tasks (compile/dev) have different file filters:

compile: [
  '<%= sourcedir %>components/*/less/**/*.less',
  '<%= sourcedir %>extensions/*/less/**/*.less',
  '<%= sourcedir %>menu/<%= menu %>/**/*.less',
  '<%= sourcedir %>theme/<%= theme %>/**/*.less'
]
dev: [
  '<%= sourcedir %>/core/less/**/*.less',
  '<%= sourcedir %>/*/*/less/**/*.less'
]

With one theme installed in src/theme/ they behave the same. With 2+ themes, dev concatenates both themes' LESS into a single adapt.css. Conflicting variables (e.g. @blend-modes) and overlapping selectors push less.js into a runaway state and the build OOMs (heap dump shows recursive Builtins_JSConstructStubGeneric frames).

It would be useful to be able to run a dev build in a FW src with multiple themes without having to perform a manual filter. It probably also makes sense from a consistency standpoint to use the same file filters for both tasks, unless we specifically need otherwise.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions