Fontawesome is not working when project is built with grunt

前端 未结 15 1163
余生分开走
余生分开走 2020-12-02 07:50

I\'m using the font library font awesome. It works when the project is not built/uglified with grunt.

But when I\'m building the project with grunt it\'s not workin

15条回答
  •  臣服心动
    2020-12-02 08:09

    As answered above this one worked very well for me too

     // Copies remaining files to places other tasks can use
        copy: {
          dist: {
            files: [{
              expand: true,
              dot: true,
              cwd: '<%= yeoman.app %>',
              dest: '<%= yeoman.dist %>',
              src: [
                '*.{ico,png,txt}',
                '.htaccess',
                '*.html',
                'scripts/components/{,*/}*.html',
                'images/{,*/}*.{webp,png,jpg,jpeg,gif}',
                'fonts/*',
                'styles/fonts/{,*/}*.*',
                'services/{,*/}*.json',
                'services/mocks/{,*/}*.json'
              ]
            }, {
              expand: true,
              cwd: '.tmp/images',
              dest: '<%= yeoman.dist %>/images',
              src: ['generated/*']
            }, {
              expand: true,
              cwd: '.tmp/concat/scripts',
              dest: '<%= yeoman.dist %>/scripts',
              src: '{,*/}*.js'
            }, {
              expand: true,
              cwd: '.tmp/concat/styles',
              dest: '<%= yeoman.dist %>/styles',
              src: '{,*/}*.css'
            }, {
              expand: true,
              cwd: '<%= yeoman.app %>',
              src: 'styles/Bootstrap/fonts/bootstrap/*',
              dest: '<%= yeoman.dist %>'
            }, {
              expand: true,
              cwd: 'bower_components/font-awesome/fonts/',
              src: ['*.*'],
              dest: '<%= yeoman.dist %>/fonts'
            }]
          }
    

提交回复
热议问题