javascript - How to introduce boostrap.css and its font files into vue
给我你的怀抱
给我你的怀抱 2017-05-19 10:27:41
0
3
646

I am in a.vue file

<style>
    @import '../css/bootstrap.css';
</style>

But it prompts an error,

给我你的怀抱
给我你的怀抱

reply all(3)
黄舟

You have not configured the correct loader to load fonts

Ty80
cnpm i --save-dev url-loader

Input module.rules: in webpack.config.js

      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        loader:"url-loader",
        options: {
          name: '[name].[ext]?[hash]'
        }
      }

Restart npm run dev.

阿神

Just use the link tag in index.html

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!