-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent ModuleConcatenationPlugin from inlining view models. #154
Comments
@bigopon Can you have a look at this one? |
@shabalin I think its behavior is a bit unfortunately confusing. The mandatory usage of
So dropping |
What we can do, to make it less surprising, is to add a warning inside |
I am going to close this issue, because I don't think there's anything to be done about it on the webpack plugin side. Preventing module concatenation is exactly what this plugin is about, through various means such as If you want to go the pure JS route, we're adding APIs for that and the solution to your problem is to declare your view explicitly. Here's @StrahilKazlachev answer from the aurelia-dialog thread:
I agree the guidance could be better. At least the error message should lead you to the solution above (adding |
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
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.
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.
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
Initially we reported this problem to the Dialog repo, please read
aurelia/dialog#361 (comment)
The text was updated successfully, but these errors were encountered: