Skip to content

webpack 5 can't set output path to / #10544

Description

@haoqunjiang

Bug report

What is the current behavior?

When the output.path is set to /, webpack 5 will fail with an EISDIR error. It works in webpack 4.
/ is commonly used when targeting an in-memory filesystem such as https://github.com/streamich/memfs; we used it quite often in tests.

If the current behavior is a bug, please provide the steps to reproduce.

git clone https://github.com/sodatea/webpack-rootdir-bug.git
cd webpack-rootdir-bug
yarn && yarn build

What is the expected behavior?

Should successfully build.

Other relevant information:
webpack version: v5.0.0-beta.14
Node.js version: v12.16.1
Operating System: macOS Catalina 10.15.3
Additional tools: None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions