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

Not creating css file for all other styles #44

Open
jeffpreussner opened this issue Apr 16, 2024 · 1 comment
Open

Not creating css file for all other styles #44

jeffpreussner opened this issue Apr 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@jeffpreussner
Copy link

I can only get the plugin to export files for the queries i enter, the css file with the queries removed no longer generates.

my config:

const path = require('path');

module.exports = {
  plugins: {
    "postcss-flexbugs-fixes":{},
    "postcss-preset-env":{  "stage": 3},
    'postcss-extract-media-query': {
      stats:true,
      entry:  path.join(__dirname, 'styles/global.css'),
      output: {
        path: path.join(__dirname, 'dist'), // emit to 'dist' folder in root
      },
      queries: {
        'print': "print",
        '(min-width:640px)': 'mobile',
        '(min-width:768px)': 'tablet',
        '(min-width:1280px)': 'desktop',
        '(min-width:1536px)': 'xl-desktop',
      },
      extractAll: false,
      config: path.join(__dirname, 'postcss.config.js')

    },
  },
};

generated files:

www/dist/global-desktop.css
www/dist/global-mobile.cs
www/dist/global-print.css
www/dist/global-tablet.css
www/dist/global-xl-desktop.css

notice there is not "global.css"

@SassNinja
Copy link
Owner

@jeffpreussner thanks for reaching out though I can't reproduce your issue

Using my postcss-cli example I always get an example.css even when setting entry & extractAll

How are you using postcss? Have you tried removing the other two postcss plugins incl. the config file?

@SassNinja SassNinja added the question Further information is requested label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants