Skip to content

external module in Angular CLI #8607

@stepet80

Description

@stepet80

Hello

We have the following situation:

  • application A provides a CDN JS bundle containing Angular objects to be used by a consuming application
  • application A provides an npm package called @myorg/core with only d.ts files an an index.d.ts file
  • application B adds a script tag towards the CDN bundle
  • application B consumes the npm package @myorg/core in an Angular CLI context
    --> So somewhere in a file an "import MyComponent from 'myorg/core'" is done which works fine (the d.ts files are detected and providing typing)
  • when the Angular cli ng build command is called it says that module myorg/core cannot be found

How can I make this work with Angular CLI?
In Webpack I would be able to use the externals property and this would work fine.

Actually I think it should be the same behavior as @types packages...

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions