Uh oh!
There was an error while loading. Please reload this page.
chore(css): css preprocessors support enhancement - #1492
Conversation
| }, | ||
| output: { | ||
| path: path.resolve(projectRoot, './dist'), | ||
| filename: '[name].css' |
There was a problem hiding this comment.
no hash in output filename, hash will be required in prod build
sirajc
commented
Jul 29, 2016
@jkuri CSS/SASS files are part of source for project and it would be good if we have that under |
+1 to @sirajc for not using |
Instead of a fixed location, how about a configuration setting for global styles? Ideally the option would accept an array of files with glob support. This allows Where to put the option is the question. Does it fit in angular-cli.json? Or would it be better to add a separate config file for project specific build options? |
jkuri
commented
Jul 30, 2016
I'll update this in the next hours, but it is not quite sure this will be merged. |
We talked a bit more about this functionality, and this is the current plan:
|
intellix
commented
Aug 1, 2016
We have component-name.css so why not index.css next to index.html? |
| from: path.resolve(projectRoot, './public'), | ||
| to: path.resolve(projectRoot, './dist'), | ||
| ignore: ['**/*.sass', '**/*.scss', '**/*.styl', '**/*.less'] | ||
| }]) |
There was a problem hiding this comment.
@jkuri public directory should be copied as is, in full. styles should be part of src
991c913 to
ecf8d51Comparejkuri
commented
Aug 1, 2016
@intellix you could change that in |
shouldn't the file be: |
jkuri
commented
Aug 1, 2016
yes, thanks, was a long night. |
1c42b72 to
dba8714Comparesirajc
commented
Aug 1, 2016
Great work @jkuri, Thanks..., with this we can define styles like "apps": [
{
"main": "src/main.ts",
"tsconfig": "src/tsconfig.json",
"mobile": false,
"styles": [
"assets/vendor/paper.bootstrap.css",
"styles/index.scss"
]
}
]👍 |
jkuri
commented
Aug 1, 2016
@sirajc no problem. I still have some minor improvements to do with injecting styles and write tests but this, I think, would be it. Actually the config looks like: "styles": {"src/style.css": {"output": "style.css","autoImported": true},"src/app.sass": {"output": "app.css","autoImported": true}}but this will be noted in the readme for sure. In the meanwhile feel free to test this and report any bugs. Thanks. |
52ffe5b to
9536ae5Comparec25fdd2 to
3862874Comparejkuri
commented
Aug 2, 2016
I managed to get mobile tests passing and working with app-shell prerender. |
| }, | ||
| plugins: [ | ||
| new ForkCheckerPlugin(), | ||
| new HtmlWebpackPlugin({ |
There was a problem hiding this comment.
We have a custom plugin for that which injects .css files configured with autoImported: true into index.html. In this plugin we have also configuration for mobile support which generates content automactically (app-shell).
jkuri
commented
Aug 3, 2016
this PR does not follow the proper design so I am closing it. |
sirajc
commented
Aug 4, 2016
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 addon allows "global" CSS extension language files in
public/dir which are then merged todist/app.cssand that file can be included inindex.html.This webpack build runs concurrently with the main build compilation.