Comments (3)
@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?
from postcss-extract-media-query.
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
from postcss-extract-media-query.
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
- I haven't implemented glob support and thus
*.css
is considered as one file - the
entry
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.
from postcss-extract-media-query.
Related Issues (20)
- extractAll not working HOT 3
- Possibility to leave original file intact? HOT 2
- Keep the media in same file HOT 2
- extractAll query mismatch HOT 1
- media css files generated but default.css missing HOT 1
- README file suggests this approach has a bigger performance impact than it actually does HOT 2
- Duplicated a media rules in css HOT 7
- cssnano and sourcemaps HOT 5
- Rules get applied every time a new file is processed HOT 3
- Unknown error, different PostCSS versions HOT 1
- Is it possible to use several entries? HOT 2
- Proposal: attach processing to OnceExit hook
- Plugin + Foundation setup HOT 13
- Webpack & entrypoints.json HOT 2
- Sass files in dist folder (Using Vite example) HOT 1
- Not creating css file for all other styles HOT 1
- Can this be used to only combine media queries? HOT 1
- File naming gets confused if source file names have more than one dot in them HOT 1
- Multiple media queries into one file. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-extract-media-query.