#Import css into a variable

1 messages · Page 1 of 1 (latest)

idle cave
#

I am trying to import the contents of a css file file into a variable called contentCss and then use it as if it was text. This does not work:
import contentCss from 'tinymce/skins/content/default/content.min.css';

orchid anvil
#

Do you use a bundler or other build tool?

#

For types you need a .d.ts file as well:

declare module '*.css' { 
   const value: string; 
   export default value; 
 }
mint rapids