-
-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
Expected Behavior
Plotly.js does not get bundled into the production build if you are using either the PlotlyViaCDNModule
or the PlotlyViaWindowModule
.
Actual Behavior
Plotly.js always gets bundled into the chunk the module is imported in (usually main).
This only happens if you install angular-plotly via npm, but not with the source project.
Steps to Reproduce the Problem
- Make a new angular project with angular-plotly.js and plotly.js (like described in the README.md)
- Add either of the two modules to the app.module.ts (like described in the README.md)
- Create a production build with
ng build --prod
You will notice that plotly.js will be bundled into themain.<hash>.js
bundle (file size ~3MB)
Specifications
- Version: 1.1.0
Other Notes
As mentioned above this only happens if you install angular-plotly.js via npm.
If you download the sources (plotly-via-cdn.module.ts
and the shared/
folder) and add them manually everything works as intended.
I don't know enough about npm-packages, but it seems that bundling makes it so all Modules are imported into the application as soon as you import one.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working