Skip to content
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

feat(@angular/cli): add platform: server #5547

Closed
wants to merge 1 commit into from

Conversation

FrozenPandaz
Copy link
Contributor

This adds the platform field to the cli config.

"browser" is by default and "server" is also allowed.

passing server will generate a bundle meant for the server via ng build

Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that confirms this functionality?

@cyrilletuzi
Copy link
Contributor

From what I understand from the commits, polyfills have been moved from common config to browser only config.

But server rendering needs the polyfills too. And for zone.js, it even needs a different import :
import 'zone.js/dist/zone-node';

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nit which will help with documentation, and it's all good.

@@ -42,6 +42,10 @@
"default": "dist/",
"description": "The output directory for build results."
},
"platform": {
"type": "string",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an enum instead of string?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no "enum" type. More like:
"platform": {
"type": "string",
"enum": ["browser", "server"],
"description": "The destination platform of app."
}

@hansl
Copy link
Contributor

hansl commented Jun 19, 2017

We should disable ng serve for server apps with this PR and re-enable it when we support it.

@glebmachine
Copy link

Looking forward this feature)

@markwhitfeld
Copy link

@FrozenPandaz Thanks so much for taking this on! Any idea on when you will get a chance to have a look at this again? I'm eagerly awaiting this feature ;)

@intellix
Copy link
Contributor

This is superseded by #6913 ?

@filipesilva
Copy link
Contributor

Closed by #6913.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants