noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
8 stars 7 forks source link

Lots of warnings during compile time #507

Open gappc opened 5 months ago

gappc commented 5 months ago

When the Data Browser is build, a list of warnings appear that are related to the way SVG icons are loaded.

Steps to reproduce

Explanation

All SVG icons in the Data Browser reside in their own components and can be included in components statically through an import or dynamically using the IconParser component.

As result, during compilation a lot of warnings appear stating that when (Icon) components are included statically and dynamically, then those components won't be moved into another chunk.

Example warning:

(!) /home/chris/projects/noi/databrowser/it.bz.opendatahub.databrowser/databrowser/src/components/svg/IconDragAndDrop.vue is dynamically imported by /home/chris/projects/noi/databrowser/it.bz.opendatahub.databrowser/databrowser/src/components/utils/IconParser.vue?vue&type=script&setup=true&lang.ts but also statically imported by /home/chris/projects/noi/databrowser/it.bz.opendatahub.databrowser/databrowser/src/domain/cellComponents/components/utils/editList/table/EditListTable.vue?vue&type=script&setup=true&lang.ts, dynamic import will not move module into another chunk.

The question is, what to do with this warnings.

The IconParser component seems to be used in QuickView components only, and once in the GpsPointMap, although there a static import would suffice.

@sseppi @MatteoBiasi @a-crea what are your opinions?