-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Postcss-cssnext and precss breaking all plugins #138
Comments
👋 The missing // required('precss // <= ')({}), Could be a bug because those two a packages, there was are PR handling that better, but not released yet since I hadn't found the time to test it out, maybe @kovensky can elaborate on this :) |
@michael-ciniawsky Yes, sorry about that - I added precss in while working in the Github editor as it wasn't still in my code, but I had tried it earlier. |
@Skilgarriff few minutes please, out of the gut you can try to hotfix at least
But not sure if it will work that way tbh :) |
@michael-ciniawsky No worries! hahaha I'll try and report back Edit: No luck with that :/ throws some crazy errors. |
@Skilgarriff what errors exactly? We need stacktrace too. |
@ai @Skilgarriff Still on it, will take a day longer, this is 👎 😛 any new info on this errors, detail config etc ? :) |
@ai @michael-ciniawsky No worries, I appreciate you working on it! No new information - I have basically recreated all of the functionality that I needed from these two plugins with other smaller plugins and not one of them has throw an error yet. Only getting broken Postcss/errors when I include one of those two. |
I have the same error with the same trace while trying to upgrade to webpack 2: I am using: My postcss.config.js
When I remove the parenthesis for the options like this,
It works. Thank you for all your awesome contribution. |
@michael-ciniawsky I have the same issue with array form of config, although object form works fine.
Update: see my next comment. |
Thanks @princed, indeed this work for me
|
Any reason why now some plugin called with () are crashing postcss-loader? https://gitter.im/MoOx/postcss-cssnext?at=582eccc42291180a7a6637d8 |
Actually it works just fine with michael-ciniawsky/postcss-load-plugins#17. @michael-ciniawsky Could you please do it? |
@Skilgarriff @princed @yasserkaddour Sry for the delay you guys, I do it today/tomorrow with other small fixes already on the list , I'm always busy with social work, there is no 'doing later' 😛 . Use {Object} style in your |
Confirmed: postcss-load-plugins does the job. But I'm still a bit confused - I ended up with 3 very similar modules:
Any reason now to keep last two? |
I have the same issue with I'm using:
Here is a part of my export default {
entry: './components/App/index.jsx',
output: {
path: path.join(process.cwd(), './public'),
filename: 'main.[hash].js',
},
plugins: [
new webpack.LoaderOptionsPlugin({
options: {
context: __dirname,
postcss: [
cssnext({
browsers: ['last 2 versions', 'IE > 10'],
}),
cssMqpacker(),
],
},
}),
new ExtractTextPlugin({
filename: 'style.[hash].css',
disable: false,
allChanks: true,
}),
],
module: {
loaders: [{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader?modules&localIdentName=[local]--[hash:base64:5]!postcss-loader',
}),
}],
},
} And .title--Njw1N {
color: red
}
@media (max-width: 800px) {
.title--Njw1N {
color: darkred
}
}
.title--13b4T {
color: yellow
}
@media (max-width: 800px) {
.title--13b4T {
color: orange
}
}
.title--FYL1K {
color: green
}
@media (max-width: 800px) {
.title--FYL1K {
color: darkgreen
}
} Please see the example here: https://github.com/azat-io/webpack2-css-modules-demo |
@azat-io It worked fine when I added the example to just one of your Might you have to run it on the Webpack CSS output afterwards? |
@anandthakker Oh, you are right. It looks like I need to concatenate all files before using CSS Mqpacker |
fixed in #161 via |
I'm currently experiencing this weird bug that seems to only occur with the Postcss-cssnext and precss plugins.
Forgot to mention my versions:
Webpack: 2.1.0-beta.25
Postcss-Loader: 1.1.1
Precss: 1.4.0
Postcss-cssnext: 2.8.0
Here is my current webpack config:
Then my postcss.config.js:
With both postcss-cssnext and precss commented out, this works perfectly fine. If I allow even one of these two plugins then all of my plugins stop working and I get errors from webpack: TypeError: [object Object] must be a function, did you require() it ?
The text was updated successfully, but these errors were encountered: