-
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
feat(@angular/cli): add platform: server #5547
Conversation
7fa7e51
to
492d6d5
Compare
492d6d5
to
80a2b85
Compare
There was a problem hiding this 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?
80a2b85
to
fe07ade
Compare
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 : |
There was a problem hiding this 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", |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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."
}
We should disable |
Looking forward this feature) |
@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 ;) |
This is superseded by #6913 ? |
Closed by #6913. |
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. |
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