Visitar URL original
Node-module "path" throws an exception when context is missing · Issue #21 · webpack/webpack · GitHub
Skip to content

Node-module "path" throws an exception when context is missing #21

Closed

Description

@jhnns

The node-module path uses process.cwd() several times, but process.cwd() doesn't seem to be a function in the browser when I haven't passed a context via the options. Imho webpack should always assume a context when no one has been specified, maybe process.cwd().

Activity

  1. sokra commented on Aug 23, 2012

    @sokra
    Member

    process.cwd() was used to return "/app" in a webpack bundle. Webpack will not use the context provided while bundling. By design webpack should not expose path info.

    The path module uses process.cwd() in resolve(). process.cwd() will now return the directory from window.location.

  2. jhnns commented on Sep 7, 2012

    @jhnns
    ContributorAuthor

    Ok ... I'm thinking of a use case where some one would work with process.cwd() in the browser. But since all real paths are removed I think there is none. So this is just a shim so the path-module won't break.

  3. sokra commented on Sep 8, 2012

    @sokra
    Member

    so i close this issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions