Skip to content

Document webpack change: add experiments.buildHttp #5274

Closed
@webpack-bot

Description

@webpack-bot

A pull request by @sokra was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#13925


  • allows to build remote resources from the http(s): protocol
  • During development:
    • creates and updates a lockfile <name>.webpack.lock
      • This file is expected to be committed to version control
    • persists remote resource contents in <name>.webpack.lock.data/**
      • It's possible to disable that with cacheLocation: false
      • These files are expected to be committed to version control
    • changes to remote resources are detected and the lockfile resp. content is updated automatically
      • It's possible to opt-out of automatic updating via upgrade: false
    • In memory or persistent cache is used to cache resources based on Cache-Control header and make If-None-Match requests.
      • That will be used for upgrade requests or when cacheLocation: false
  • During production it operates in frozen lockfile mode:
    • No network requests are made and build is done from lockfile and content
    • Missing or incorrect resources will lead to an error
  • Cache-Control: no-cache resource are not cached, persistent or locked. They will be requested on each build.

Example: https://github.com/webpack/webpack/tree/feature/http-urls/examples/build-http

What kind of change does this PR introduce?
feature

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?

  • experiments.buildHttp: true
  • experiments.buildHttp.frozen: boolean
  • experiments.buildHttp.upgrade: boolean
  • experiments.buildHttp.cacheLocation: string | false
  • experiments.buildHttp.lockfileLocation: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions