LoginSignup
3
5

More than 5 years have passed since last update.

VueアプリケーションにBulmaを組み込む

Last updated at Posted at 2018-12-19

Vue用のBulmaコンポーネントとしてVuetifyがありますが、ちょっと盛りすぎ&後から組み込むのが大変そう。。
なので、ザクっと作ったVueアプリケーションに後からクラスを付け足してBulmaを適用することを想定しています。

$ yarn add sass-loader node-sass

sass用のディレクトリとscssファイル作成。

$ mkdir src/assets/sass
$ touch src/assets/sass/main.scss

src/assets/sass/main.scss

Bulmaをインポート。

@import '~bulma/bulma'

src/main.js

import Vue from 'vue'
import App from './App.vue'
import router from './router'

require('./assets/sass/main.scss'); //追加

こんな感じになります。

vue-bulma.png


参考

Vue.js + bulma + Vue-cliでシンプルにおしゃれな静的サイトを作る
Setup New Vue Webpack Project With Bulma

3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5