8000 Support of asynchronous computation in DefinePlugin.runtimeValue · Issue #16629 · webpack/webpack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support of asynchronous computation in DefinePlugin.runtimeValue #16629
Open
@AGrzes

Description

@AGrzes

Feature request

What is the expected behavior?
DefinePlugin.runtimeValue supporting async function / promise / callback for resolving value.

What is motivation or use case for adding/changing the behavior?
DefinePlugin.runtimeValue allow dynamic generation of define values and re-generation based on file-system changes.
Lack of async support means that

  • If value is calculated from file contents they have to be read synchronously
  • The processing can not use any library that provide exclusively async (promise/callback) api
  • Blocking sequential operations will slow down the build
  • Blocking operations will block the whole process which may be a big problem if webpack is as part of bigger program

How should this be implemented in your opinion?
I do not understand the code enough to suggest solution.

Are you willing to work on this yourself?
yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Priority - Low

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0