less / less/less.js

Custom Plugin (Functions) promise async

Open
#3,720 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

Hi, so i am using webpack, and created a custom function that returns path to image from manifest.json, as i have to wait until manifest.json is created, before i return something from function, i am using await, but it return promise object to less file. Is there a workaround to resolve the promise in less?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the custom Less function in the webpack setup, using the delayed manifest.json input, and inspect how the function result is passed into Less. No source file or test is named; done would require demonstrating support for promise-returning functions or documenting a confirmed workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.