-
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
Absolute path usedin --deploy-url caused warning #8847
Comments
That warning is intentional. The dev server is served using the Also, for the example path shown above, setting the port to 32323 would allow the application to be accessed from |
@clydin Does --host and --port set the concatenated value to webpack_require.p variable? |
|
@clydin That's why I need to set absolute path on --deploy-url. I came out a solution to integrate Angular CLI project into ASP.NET MVC. In ng serve mode, the application is hosted in IIS Express (assume the port number is 4201), and it's rendering index.html content. I need to also emit scripts and styles that are hosted in dev server (assume port number is 4200) to make automatic build works. Without setting webpack's public path variable, I will get errors as the Angular/Angular CLI think the scripts are hosted in 4201. I know Angular CLI is hiding many complexities of Webpack, --deploy-url is only parameter I found that can change webpack public path (__webpack_require.p), I don't know why you don't like absolute path set to this parameter |
If IIS is the client facing server then for development it should be configured to forward the necessary requests to the CLI's dev server. Assuming the application would then be hosted on IIS in some form in production, this would then mimic the production environment. Also, note that the deploy URL and/or base HREF settings are actually used to generate the application. The dev server just cannot use them to serve the application as explained above. |
The setting is only for |
To clarify, are you saying it doesn't work when using deploy URL or that you don't want to see the warning? |
It's working so far. I just don't want to see the warning, and I hope the absolute value won't break other stuff. |
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. |
Versions
Repro steps
Set absolute path (e.g. http://localhost:32323/) to --deploy-url caused warning
Observed behavior
Desired behavior
No warning, and the value should be supported
Mention any other details that might be useful (optional)
The text was updated successfully, but these errors were encountered: