After installing bulma through NPM, how can I refer it in my project

前端 未结 7 1739
北荒
北荒 2021-02-02 06:15

I have pulled in bulma in my project through :

$ npm install bulma

After that, how can I refer to it in my pages. I really don\'t know how to

7条回答
  •  死守一世寂寞
    2021-02-02 06:46

    I had the same issue in Vue and in the end I solved it thanks to this link. For Bulma you just need to run:

    $ npm install bulma

    After npm install, your files should be located under node_modules folder.

    For Bulma, check that you have a folder bulma under node_modules, then you can import bulma css framework in your main.js file as follows: import "./../node_modules/bulma/css/bulma.css";

    Note: even if on the link I provided they suggest the full path to bulma this is not a good practice as @Omkar pointed out, so I ended up importing bulma as follows: import "bulma/css/bulma.css";

提交回复
热议问题