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

fix(webpack): fix missing postcss in less/scss/styl processing #1153

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

3cp
Copy link
Member

@3cp 3cp commented Oct 31, 2019

closes #1152

@graycrow @Sayan751 please review this fix. At mean while, I am going to run through release check on webpack.

@3cp 3cp force-pushed the fix-missing-postcss branch from 7d74162 to f00b0de Compare October 31, 2019 21:19
@3cp 3cp force-pushed the fix-missing-postcss branch from f00b0de to 00c9628 Compare October 31, 2019 21:20
@3cp
Copy link
Member Author

3cp commented Oct 31, 2019

release check passed.

Copy link
Member

@Sayan751 Sayan751 left a comment

Choose a reason for hiding this comment

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

@3cp In general the changes look good to me. Just noticed a couple of things.

@@ -222,8 +222,7 @@ module.exports = ({ production } = {}, {extractCss, analyze, tests, hmr, port, h
issuer: [{ not: [{ test: /\.html$/i }] }],
use: extractCss ? [{
loader: MiniCssExtractPlugin.loader
},
'css-loader'
}, ...cssRules
Copy link
Member

Choose a reason for hiding this comment

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

This is not directly related to the changes. I have noticed that at present CSS modules have not been used. Is it better to add support for that too? If you decide to do so then, it might not make sense to import the CSS (modules) in HTML as the original local name will take no effect, as the names will be morphed (BTW which actually works vNext, with the help of convention I believe :)).

Copy link
Member Author

Choose a reason for hiding this comment

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

The cssRules is 'css-loader' plus postcss. I think the previous line was missed when introducing cssRules into the code. The previous line missed postcss setup which is a bug.

Yes, there is no css-modules offered in Aurelia 1 skeletons.

Copy link
Contributor

@graycrow graycrow left a comment

Choose a reason for hiding this comment

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

Well, this fixed the issue for me, thank you @3cp. I tested it on my project (SASS based) and can confirm that build works well. Because I'm not using extractCss in that project, I missed the similar issue for css files, so again, thank you for noticing that.

@3cp 3cp merged commit c246d66 into master Nov 3, 2019
@3cp 3cp deleted the fix-missing-postcss branch November 3, 2019 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Webpack] cssRules does not apply to .scss files imported from a .html file.
3 participants