Import css in node_modules to svelte

前端 未结 7 1064

I want to use css framework in my svelte project, in this case it was uikit.

I had install it with yarn add uikit

And of course i have to import

7条回答
  •  执念已碎
    2020-12-09 11:03

    With Svelte v.3.24.0 it is possible to import css directly in your component's style tag:

    
    
    • component's style tag should contain lang="scss" attribute.
    • and please notice that css file's import should be without an extension after the file name

    So we don't need to install any additional Rollup plugins here.

提交回复
热议问题