Perspective Component Javascript

Still trying to wrap my head around a module for a perspective component. I was curious as to why the RadComponents.js file is so large. Do the three components in the perspective.component project really need ~2500 lines of custom javascript? Or is some of that copied from a library an existing js library?

1 Like

The vast majority of that file (~1800 lines) is from the "Axios" HTTP client library that's imported. If you don't want it or need it for your component(s), remove it from the package.json in the client package.json (or remove it with npm).

Web dependencies have to be "assembled" together like this because the web world is a tangled nightmare. There's probably also dead-code elimination that could be turned on at the bundling level; I don't know offhand whether the example module does that.

2 Likes