0.33.1 - webpack - config.globalResources not working

I have succeded in installing the Aurelia cli version 0.33.1 and now previous version and require based project won’t run with “au run” (but let’s say no matter - who has never made a bug…) - the think that’s going wrong and annoy me is that resources registering thru an index.js file with

config.globalResources(["./elements/test"])

seems not to be handled by the webpack bundle (console message Unhandled rejection Error: Unable to find module with ID: resources/elements/test) - I have tried a lot of paths but did not find a good one - so I turn to the

<require from="…

solution whitch is not really clever… is this an issue (or me ?:-))

You need to wrap the global resource with PLATFORM.moduleName. search the discourse Forum or take a look at the Docs for further clarification.

1 Like

you (-:

what @zewa666 said
as well take a look at this tutorial
http://aurelia.io/docs/tutorials/creating-a-contact-manager#building-the-application-shell

1 Like

Thanks a lot - …arglll, me again - it’s been a long time since I read the documentation!
For my understanding, PLATFORM.moduleName seems used everywhere now… hum… not a big deal - a human can do this… but for my understanding… when not to use it?

The need for moduleName is to explain Webpack properly how to find those additional resources. So in essence wherever you dynamically load content, like in globalResources, plugin names or the sorts use PLATFORM.moduleName.
There is work underway to remove the need for that by using a different API

First, thanks again for your answer - I can now move my code to the new version.
I can understand the webpack needs - and the fact that when something is flaged, it’s flaged so there are no misunderstandings…
But as a lazy developer I may have prefered to set the minimum - my job is to make bugs, it should be the builder job to find which buged-modules I am using from a dependency walk [I am really lazy :-)] - don’t you think so?
(I think i use some gulp-amd to do this for require - and so far it works)

If you’re referring to error messages, those exactly state that, can’t find requested module/resource :slight_smile:
Nevertheless as said we all agree that its suboptimal having to add those flags and I hope said PR gets merged quickly