Skip to content

Critical dependency warning on a require.resolve #4681

Closed

Description

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Critical dependency warning on require.resolve call.

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

Create a file with following contents and process it with default webpack config:

let resolvedPath = require.resolve('somepath');

What is the expected behavior?

No warnings expected due to this is not a require statement and no external modules are loaded.

If this is a feature request, what is motivation or use case for changing the behavior?

–

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

macOS 10.12.4 (16E195)
nodeJS v7.7.2
webpack v2.3.3

Activity

  1. TheLarkInn commented on Apr 9, 2017

    @TheLarkInn
    Member

    Could you please include a small reproducible example repo?

  2. sokra commented on Apr 11, 2017

    @sokra
    Member

    @webpack-bot move to webpack/webpack.js.org

    Document behavior for dynamic expressions.

    webpack is a static bundler and requires statically analysable expressions.

  3. webpack-bot commented on Apr 11, 2017

    @webpack-bot
    Contributor

    I've moved it to webpack/webpack.js.org.

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