I’m trying to import styles for a functional component like so:
import { h } from '@stencil/core';
import './uk-button.scss';
export const UkButton = ({ element: Element, ...rest }, children) => (
<Element class="uk-button uk-button-default" {...rest}>
{children}
</Element>
);
I can create a CSS bundle using rollup-plugin-scss
, here’s the excerpt from stencil.config.ts
:
rollupPlugins: {
after: [rollupScss({ includePaths: ['../../../node_modules/'] })],
},
But the CSS bundle isn’t referenced in any of the built component files as far as I can tell.
Is it possible to import styles like this?