Closed iSokrat closed 1 year ago
@43081j Could you please take a look?
so sorry i've taken a while to get to this @iSokrat
its been a busy couple of weeks.
off the top of my head, there isn't anywhere in postcss config to pass plugin settings. so it may end up i need to contribute back upstream to postcss, or we put the config elsewhere (e.g. package.json
).
ill have a look at it this week for sure
just to update, this is more difficult than expected.
basically i was wondering if we can just auto-detect a babelrc
and load that. but the babel module which does that produces a different structure than what the babel parser needs.
it may be we just have an extra section in the postcss config or package.json.
@43081j How do you see this may look via postcss config? Do you already have some POC?
i think whichever file we put it in, we'll need logic (e.g. through cosmiconfig or postcss-load-config) to pull the relevant config file in. then look in there for some custom property like lit: {babelOptions: {...}}
.
we don't already get access to the config so its likely upto us to read it in like that
Okay, let's then review the total result, thanks.
@43081j Hello, any updates regarding this issue?
there you go, i have implemented it in #45
sorry it took so long, i have had a lot to work on this month.
No worries, everything is fine
ill see if i can get it merged and released this weekend 👍
thanks a lot for the suggestion too
Hello @43081j . I think this change is not available on NPM. Will you publish this change there?
@iSokrat published 1.1.0
let me know if it works for you 👍
you can find an example in the bottom of the readme
Based on this discussion: https://github.com/43081j/postcss-lit/issues/13#issuecomment-1413365189
We need to have ability to somehow overwrite built-in configuration for babel. Without this we can't apply
postcss-lit
for the files, where, for example, different approach for decorators in js is used.