Problem with Proj4 library in custom widget

1
I'm having a problem with including the proj4 library in my custom widget. I have the (non-minified) proj4-src.js in my lib folder, along with jquery, openlayers and bootstrap. All included like so: "WidgetName/lib/jquery-1.11.2", "WidgetName/lib/bootstrap", "WidgetName/lib/proj4-src", "WidgetName/lib/openlayers-3.15.0", All files are then loaded like so and are fine: http://localhost:8080/widgets/WidgetName/lib/bootstrap.js?636072043809 except for the proj4 one, Mendix tries to load it via this link: http://localhost:8081/mxclientsystem/WidgetName/lib/proj4-src.js?636072043809 and this gives a 404. Now I found if I manually change the includes like so: "WidgetName/lib/jquery-1.11.2", "WidgetName/lib/bootstrap", "/widgets/WidgetName/lib/proj4-src.js", "WidgetName/lib/openlayers-3.15.0", then it works on localhost, however, this can't be deployed because when you run "Tools > Check widgets" the following error appears in the logs. Missing dependency. module: WidgetName/widget/WidgetName; dependency: /widgets/WidgetName/lib/proj4-src.js Does anyone here have an idea why this particular library doesn't want to cooperate?
asked
0 answers