-
-
Notifications
You must be signed in to change notification settings - Fork 111
Description
I'm submitting a bug report
We were very excited with the news that there is no more need to PLATFORM.moduleName dialog view models, so we decided to give it a try.
https://aurelia.io/blog/2018/09/06/aurelia-release-notes-early-september-2018
Usage of Origin.get was removed; we now depend on the built-in support for class references from the CompositionEngine. What does this mean? Usage of class references for .viewModel should no longer cause issues with Webpack when PLATFORM.moduleName() is not used.
We removed all dialog VMs PLATFORM.moduleName() statements in our codebase, and were very happy to see dialogs working when we run app in webpack development mode. Unfortunately, the behavior is different in production mode. We prepared a repo based on Aurelia CLI app template that reproduces and issue.
- Library Version:
2.0.0-rc.3
Please tell us about your environment:
-
Operating System:
OSX 10.13.6 -
Node Version:
v10.6.0 -
NPM Version:
6.4.0 -
JSPM OR Webpack AND Version
webpack 4.16.4 -
Browser:
Chrome 68 -
Language:
TypeScript 2.9
Current behavior:
If i build a bundle with mode: "production" I am getting the following error on dialog opening.
aurelia-templating.js:792 Uncaught (in promise) Error: Cannot determine default view strategy for object.
at e.getViewStrategy (aurelia-templating.js:792)
at aurelia-templating.js:4802
in development mode dialog does open with no errors
I was able to reproduce the issue for the clean Aurelia App template (created using latest AURELIA CLI)
https://github.com/shabalin/aurelia-dialog-issue-361