1

I have Angular 4 application with several lazy loaded modules. I working as expected as standalone (in local development server), however when I try to deploy it using Django application...

Main page - index.html is generated by Django view from the built index.html by angular-cli, all pathing to bundle.js files are adjusted to use static content pathing and all is working until I try to lazy load...

It tries to find file 0.*****.js in a root directory, where the file is not, because is in static content location...

Changing <base href="/static/"> would load lazy file(s) but would also change the whole url and corrupt routing... (I am also looking to static content be on external server)

How I can adjust path there files to be lazy load (0.*****.js) are located without changing <base href="/static/"> ?

1

1 Answer 1

2

The solution is to set --deploy-url (short-hand -d) with build command

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.