stencil-community / stencil-postcss

Autoprefixer plugin for Stencil
https://www.npmjs.com/package/@stencil-community/postcss
Other
30 stars 24 forks source link

Update type declarations, should also work if context is undefined #15

Closed DesignByOnyx closed 2 years ago

DesignByOnyx commented 5 years ago

There are two issues with the way the component is today - I am wrapping them up in one issue as I am about to file a PR.

Issue 1: type declarations for Diagnostic are out of sync with stencil/core. Specifically the "level" and "type" properties need to be loosened into string instead of the enum which is there currently. This is the same change which has already been applied in stencil/sass.

Issue 2:

UPDATE: The type definitions were updated after I opened this issue and my PR. Hence the strikethrough above.

In my project, I am importing css from a 3rd party module like this:

@import '@our-company/global-styles';

but the imported CSS file is not being processed due to context being undefined. By moving the context check to a different place, I am able to import our CSS successfully (you will see in the PR). If you have a better suggestion on how to fix this, I will gladly implement it.

splitinfinities commented 2 years ago

Can you help my out by creating a reproduction repo with the latest versions of @stencil/core and @stencil/postcss?

DesignByOnyx commented 2 years ago

I haven't worked with Stencil for quite some time. I'll go ahead and close this as I don't remember how to reproduce this.