-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Lazy loaded modules with AOT are using incorrect base path #4734
Comments
I think when you have a base path you need to explicitly pass it to build / serve as It seems that the output is meant to be used only with the base href it was built with. You cannot just take it and use it with other path. I have seen someone in another issue before set base href to some token that their server replaces later as pure string replacement. |
I did try setting the |
You can try using using |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Windows 7
Versions.
@angular/cli: 1.0.0-beta.31
Repro steps.
I am loading my angular app from a website with a different base path, and when I try to use both lazy loading modules with the aot compiler I am getting an error. From what I can see, it is using the website's base path rather than the angular application's, and so fails to find the chunk files.
The log given by the failure.
Mention any other details that might be useful.
So the 1.chunk.js file should be loaded from http://widgets.local:4200 rather than the http://gold.local/... url it is trying to use - gold.local is the website which has embedded the various scripts (main.bundle.js, etc.)
My app.routing.js file looks like
I am running my app locally with
The text was updated successfully, but these errors were encountered: