Open RedHatter opened 5 years ago
huh, I can't imagine how that would happen. postcss-load-config doesn't look at process.argv
. Can you paste some more details, maybe your rollup/svelte config?
It doesn't require rollup to reproduce. See the following example
const postcss = require('svelte-preprocess-postcss')
const svelte = require('svelte')
svelte.preprocess(`
<style>
span {
color: red;
}
</style>
`, {
style: postcss()
}).then(console.log)
run with
node index.js --config
While postcss-load-config
doesn't look at process.argv
the version of cosmiconfig
that it uses (2.1.0) does. See index.js#L23
d'oh. That's dumb.
It looks like options are passed straight through from postcss-load-config to cosmiconfig, so passing in argv: false
on the options object would probably fix it.
I wonder if that change should be made in postcss-load-config... that seems like bad default behavior
If this preprocessor gets executed with a command having the
--config
argument (e.g.rollup --config
) I get the following error.