Closed Alexandr-Lazariev closed 5 years ago
@Alexandr-Lazariev I've updated the webpack example to use the latest version of postcss-loader. It's still working afterwards.
However I'm using webpack 4, not 3. Have you considered upgrading to 4?
Hey, thanks for reply, actually my issue was related to incorrect path, instead of using 'dist' I should have used 'assets', as simple as that.
However, I'm still facing another issue, I have a lot of css files in my assets folder and I'm not sure how can I use entry and output setting to have multiple query files from multiple entries with different names
entry: path.join(__dirname, outputPath + '/*.css'),
output: {
path: path.resolve(__dirname, outputPath),
name: '[name]-[query].css'
},
queries: {
'only screen and (min-width: 1025px)': 'desktop'
},
minimize: true,
whitelist: true,
}
The output file name is: *-desktop.css and I want to have: global-desktop.css specific-desktop.css
I guess the whole problem is
path.join(__dirname, outputPath + '/*.css')
But I'm not sure what should be here instead
I guess the whole problem is
path.join(__dirname, outputPath + '/*.css')
But I'm not sure what should be here instead
yup, the problem is starting there
*.css
is considered as one fileentry
option is not built to support multiple entries but only one file, assuming the postcss plugin is executed per file (either manually or via bundler/task runner)Please provide your webpack config & package.json so I can reproduce the issue.
Hi, I'm trying to extract some media queries from my css bundles, but unfortunately plugin is not working.
Here is my postcss.config.js
Postcss works fine without this plugin. I'm using webpack 3 with it. Part of my package.json
Do you have any idea why it's not working?