Skip to content

Document webpack change: refactor filesystem interfaces #3110

@webpack-bot

Description

@webpack-bot

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

See pull request: webpack/webpack#9251


add Compiler.intermediateFileSystem
avoid using path and fs module when possible
move join, mkdirp and dirname into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface

What kind of change does this PR introduce?
refactoring

Did you add tests for your changes?
existing tests

Does this PR introduce a breaking change?
yes

What needs to be documented once your changes are merged?

  • new property intermediateFileSystem on the Compiler
    • allows to override the file system for all actions by plugins that are not considered as output
    • Plugins should use this file system to write and read intermediate files
    • It defaults to fs.
  • mkdirp is no longer expected to be a function on the output file system
  • join is now optional on the output file system
  • dirname is a new optional method on the output file system
  • the output filesystem defaults to fs now
  • NodeOutputFileSystem class has been removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    webpack5Docs for webpack 5

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions