Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70923

Import styles for Stencil functional component

$
0
0

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?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>