javascript - Webpack custom attribute md-icon-src is not converted when packaging
阿神
阿神 2017-05-18 10:58:30
0
1
448

There is a component in my Vue project

  <md-bottom-bar-item v-for="tab in tabs"
    :id="tab.id"
    md-icon-src="../assets/icon/ic_home_black_48px.svg"
    :md-active='tab.active'>{{ tab.title }}
  </md-bottom-bar-item>

But when npm run build, md-icon-src is not converted into a packaged path.
But check that webpack.base.conf.js supports svg

  {
    test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
    loader: 'url-loader',
    options: {
      limit: 10000,
      name: utils.assetsPath('img/[name].[hash:7].[ext]')
    }
  },

Is this because md-icon-src is a custom attribute? How to solve it.

阿神
阿神

闭关修行中......

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!