Import path of third-party library is rewritten from `openlayers` to `openlayers/index`
See original GitHub issueType of Issue
- Bug Report
- Feature Request
Description
I have a module MapModule that is using openlayers 3 library, so in map.component.ts I have
import * as ol from 'openlayers';
When I run packagr, rollup compiles files with the following line:
import { Map, View, control, format, layer, proj, source } from 'openlayers/index';
i.e. it adds /index
at the end, when it should be just openlayers
This issue is related to rollup.js, here is the url that is related to this problem: https://github.com/angular/angular/issues/16084
To fix this issue: I need access to “annotateForClosureCompiler” property so it can be set to false. At this moment it’s part of tsconfig.ngc.json
and it set to true
by default. Would it be possible to extend packagr so that I can fiddle with tsconfig properties via ng-package.json
file?
Thanks Alex
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top GitHub Comments
This is my current
ng-package.json
but packagr still producess the following line
import { Map, View, control, format, layer, proj, source } from 'openlayers/index';
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.