Uh oh!
There was an error while loading. Please reload this page.
feat(build): update angular-cli.json - #1633
Conversation
e1e2070 to
dc1f1c3Compare| { 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.
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.
dc1f1c3 to
56e4f72Compare0d55fe6 to
ee59a84Compare| @@ -5,9 +5,24 @@ | |||
| }, | |||
| "apps": [ | |||
There was a problem hiding this comment.
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.
This PR isn't aimed to implement the multiple apps workflow yet, so it's better not to change it.
9f3e074 to
9a603ecCompare9a603ec to
d0aa1b0Compared0aa1b0 to
b74d609Compare059eff5 to
dc59480CompareMeligy
commented
Aug 19, 2016
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? |
filipesilva
commented
Aug 19, 2016
The example is updated to show it as not being an array, but that might change in an upcoming PR. |
PostImpatica
commented
Aug 21, 2016
I'm now loading bootstrap with |
Meligy
commented
Aug 21, 2016
@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. |
Blasz
commented
Sep 21, 2016
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. |
daBishMan
commented
Nov 9, 2016
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? |
Meligy
commented
Nov 10, 2016
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 Closesangular#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