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

media css files generated but default.css missing #26

Open
jwamsterdam opened this issue Mar 11, 2020 · 1 comment
Open

media css files generated but default.css missing #26

jwamsterdam opened this issue Mar 11, 2020 · 1 comment

Comments

@jwamsterdam
Copy link

Hi,

I am running postcss-extract-media-query as a standalone node js instance, and all my media query css files are created.

I dont see the 'default.css' file with the leftovers on my file system.

hereby my code:

const options = {
    output: {
        path: path.join(__dirname), // emit to 'dist' folder in root
        name: '[name]-[query].[ext]' // pattern of emited files
    }
};


fs.readFile('raw_css.css', 'utf8', function (err, data) {
    if (err) {
        return console.log(err);
    }

    postcss([extractmq(options)]).process(data).then(result => {
            console.log('new css file written')
        });      
    })

can you give me advice?

btw, since I would like to futher process the results, how can I store the results in an object instead of file system? I don't use webpack, I extract css from an url and parse in your code.

Thanks a lot!

@erichstark
Copy link

erichstark commented Jul 14, 2020

Any update on this? I have the same problem even with webpack integration.

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

No branches or pull requests

2 participants