Skip to content

Correctly resolve WebPack loaders within npm linked modules #3419

Closed
@garkbit

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.

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