Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !10494

Add support for LESS stylesheets

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/xtech-guru/add-less-support into main Feb 03, 2021
  • Overview 11
  • Commits 7
  • Pipelines 0
  • Changes 21

Created by: hbj

Resolves #10336 (closed)

Changes done has been mainly deduced from the current implementation for SASS support. These include:

  • Add opt-in support for LESS and LESS modules to webpack config in react-scripts with the possibility to pass options to less-loader through a predefined file in the app root folder
  • Add documentation
  • Add LESS support utils to react-dev-utils
  • Add tests to kitchensink test suite

Test plan:

  • Manually test the end-to-end flow as described in the contribution document. The following features have been tested:
    • Loading of local LESS stylesheets
    • Loading of LESS stylesheets from node_modules
    • Loading of local LESS modules
    • Generated CSS identifier of LESS modules (for index and non-index files)
    • Helper error message output if less hasn't been installed
  • Added unit tests and made sure they pass by running the corresponding test suites (yarn e2e:docker --test-suite <test suite>). Tests that are not passing don't seem to be related to this PR.

NOTE: The documentation contains a hint that the feature is available with react-scripts@4.1.0 and higher. I included this temporarily as I don't know in which version this would be included, so this has to be updated once the information becomes available.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/xtech-guru/add-less-support