-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(build): update angular-cli.json #1633
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
Conversation
e1e2070 to
dc1f1c3
Compare
| { include: additionalFiles, test: /\.scss$|\.sass$/, loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'] }, | ||
|
|
||
| { test: /\.json$/, loader: 'json-loader' }, | ||
| { test: /\.(jpg|png)$/, loader: 'url-loader?limit=128000' }, |
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.
Even though its not technically part of the new loader code, would you mind changing the limit also to 10000?
I think its a safe standard threshold for when we want to let webpack decide to either bundle base64 files vs emit them into the dist folder.
base64 encoding makes file sizes roughly 33% larger than their original binary representations (when embedded in css/js), but actually much smaller when gzipped. So we want this technique but not for large images.
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.
Done
dc1f1c3 to
56e4f72
Compare
0d55fe6 to
ee59a84
Compare
| "version": "<%= version %>", | ||
| "name": "<%= htmlComponentName %>" | ||
| }, | ||
| "apps": [ |
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.
I'm not sure what the plans are for supporting library generation with the CLI, but I was thinking that apps might be better named modules with a type field for each module definition which would correlate to a set of webpack configs for that type (e.g., app or lib).
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.
This PR isn't aimed to implement the multiple apps workflow yet, so it's better not to change it.
9f3e074 to
9a603ec
Compare
9a603ec to
d0aa1b0
Compare
d0aa1b0 to
b74d609
Compare
059eff5 to
dc59480
Compare
|
Regarding From the example at the top of this discussion. Shouldn't this be an array? Or else use a singular property name instead of a plural one? |
|
The example is updated to show it as not being an array, but that might change in an upcoming PR. |
|
I'm now loading bootstrap with |
|
@helzgate the ones in your app will continue to work. They are part of Angular and are meant to be supported by the CLI. They are not temporary workaround for the global CSS loading, although they can be used as such. My understanding is that with the new global styles feature, you are meant to have a CSS file with several CSS imports inside it. Webpack (not the browser) will track and load the CSS imports and bundle them, similar to how you could have required / imported the CSS file from JavaScript. So, even without array support, you can have one global CSS file that you create, and import bootstrap's CSS and any other global stylesheet in it, and it's like a directory or a JS barrel. |
|
What was the reasoning behind not bundling polyfills.ts separately anymore? Surely it's better from a caching standpoint to keep it as a separate bundle as they aren't going to change as frequently as application code. |
|
@Blasz tree shaking makes the caching problem very hard, so we're not focusing on it that much. |
|
is the issue with loading fontawesom fonts part of this issue, or is that addressed, I am still seeing this running my application locally. Can someone elaborate on the current status of loading fontawesome fonts in CLI project please? |
|
Not sure about fontawesome, but I had an app using Twitter Bootstrap glyphicons, which I guess would be the same thing. They were working fine. I seemed to have some issue with base-href, but I have a lot of moving parts in this app that I need to verify before I call this on the CLI itself. |
|
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. |
With this change we add SSL support to the SSR dev-server. We expose 3 new options; - `ssl`: Turn on/off HTTPs - `sslKey`: SSL key to use for serving HTTPS - `sslCert`: SSL certificate to use for serving HTTPS Closes angular#1633
This PR replaces some hardcoded values in the build system by values specified in
angular-cli.json. It also adds thestylesproperty that allows users to add global styles.The
appsentry inangular-cliconfig looks like this now:Please note these breaking changes:
apps[0].rootreplaces the previousdefaults.sourceDir.apps[0].assetsdirectory replaces the previouspublicfolder in the project root as a folder whose contents are copied over without processing.polyfills.tsis no longer bundled separately, but rather included inmain.ts.A description of the
stylesproperty is below, as shown inREADME.mdGlobal styles
The
styles.cssfile allows users to add global styles and supports CSS imports.If the project is created with the
--style=sassoption, this will be a.sassfile instead, and the same applies to
scss/less/styl.Closes #1603
Closes #1618
Closes #1459
Closes #1573
Closes #1541
Closes #1586
Closes #1463
Closes #1145