Skip to content

Correctly resolve WebPack loaders within npm linked modules #3419

Closed

Description

@garkbit

OS?

OSX Sierra

Versions.

angular-cli: 1.0.0-beta.18
node: 6.9.1
os: darwin x64

Repro steps.

Install NPM linked package that uses a WebPack loader. Loader cannot be resolved.

The log given by the failure.

Module not found: Error: Can't resolve 'style' in '...'

Mention any other details that might be useful.

Merge #2291 was incomplete, in that it does not fully address the issue raised in #1875. It fixes module resolution, but not loader resolution. The following needs to be added to the object returned from getWebpackCommonConfig() in webpack-build-common.ts in order to match current module resolution strategy:

resolveLoader: {
  modules: [path.resolve(projectRoot, 'node_modules')]
}

Also, I would submit a pull request, but the the corporate overhead of getting a CLA in place are prohibitive.

Activity

  1. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Dec 6, 2016
  2. hansl commented on Dec 6, 2016

    @hansl
    Contributor

    As for the CLA, it's a one time cost that really takes 5 minutes to complete. If you have legal complications I can understand, though.

  3. garkbit commented on Dec 6, 2016

    @garkbit
    Author

    @hansl, thank you sir.

    You're right, submitting the CLA is easy enough. It's the internal process of getting an approval for it on my end that's a pain. Again, thanks for making the change. :)

  4. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 6, 2019
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

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort1: easy (hours)type: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions