-
Notifications
You must be signed in to change notification settings - Fork 210
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
Deployed Angular 5 app results in 404 for require.js #896
Comments
The example you are showing is with |
No, under v4 we used dart2js. |
So that's not comparing apples and oranges then :) Any reason you'd want to deploy |
Sure, the goal wasn't to compare but to point out the issue.
Jan 17, 18:13, on Gitter dart-lang/source_gen, we were discussing the building and testing of the Angular example apps. In the end you wrote:
To which Jacob agreed. Until there is an easier way to switch between web compilers (#801), I was planning on building, testing and deploying using dartdevc. In any case, if this is a real problem with dartdevc, should I be reporting the issue over dartdevc? |
This definitely isn't desirable, for lots of reasons. We don't do this internally.
It's not clear to me if this is an issue with |
My bad, I misunderstood. I'll switch back to deploying using dart2js. |
The issue here is that it is being deployed under a subdirectory, we don't really have a good solution for that at this time with dartdevc. We should keep this issue open anyways as actually solving it would also allow us to remove some hacks that are currently in place for package:test. |
Thanks for the feedback @jakemac53. @matanlurey asked:
I've tested this locally and I can confirm that this problem doesn't manifest itself when using Note that the script paths created by the default dart2js transformer (or whatever a "transformer" is called under the new build system), have no leading <script defer src="packages/browser/dart.js"></script> As you probably know, the dynamically generated path to, say, <script defer="" src="/packages/$sdk/dev_compiler/amd/require.js" data-main="http://angular-examples.github.io/quickstart/5/main.dart.bootstrap"></script> (1) So one thing would be to have the dynamic (2) The other problem seems to be that required scripts like the following are being dynamically added to the top of the <script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="main.dart.bootstrap" src="http://localhost:8080/web/main.dart.bootstrap.js"></script> These are WDYT? |
FYI, the app at http://angular-examples.github.io/quickstart/5 has been replaced by the dart2js version so you won't be able to see a hosted version of the dartdevc-built app anymore. |
Any actionable item here @chalin? |
Yes, the problem still stands and, as @jacob314 wrote:
|
Great! |
TL;DR
<base href>
is ignored bymain.dart.js
generated for Angular 5 app.The deployed version of the 5.0.0-alpha+4 version of the quickstart example app fails to load with the following error appearing in the console:
To reproduce, visit: http://angular-examples.github.io/quickstart/5 [Edit(2018/01/24): the app has been replaced by the dart2js version so you won't be able to see a hosted version of the dartdevc-built app anymore.]
This problem did not appear using the old build system under Angular 4.
What seems to be happening is that the
<base href="/quickstart/5/">
contained inindex.html
is being ignored by by main.dart.js:The setting of the baseUrl doesn't seem to take the
<base href>
.cc @kwalrath @kevmoo @matanlurey
The text was updated successfully, but these errors were encountered: