dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Should add module using `load` to the `CoreLoadPlugin` map when imported in tests #106

Closed agubler closed 7 years ago

agubler commented 7 years ago

Bug

Currently if we build (with no auto bundling) a project that uses load(require, './MyWidget') and the module is imported in unit tests, the tests fail for Missing module: src/MyWidget.

Expected behaviour is to ensure that modules are added to the map in CoreLoadPlugin if they are imported in the unit tests even if the load is registered in the projects src directory.

mwistrand commented 7 years ago

cli-build is working as intended: mids are parsed from @dojo/core/load calls if 1) the disableLazyWidgetDetection is falsy and 2) the load call is coming from within a WidgetRegistry#define.

@dojo/cli-test-intern sets disableLazyWidgetDetection to true without a means of changing that. I've opened a new issue in that repo.