[Vuejs]-Nuxt.JS scss doesn't load svg files

0👍

Solved it by using GULP

`

var gulp = require('gulp');
var base64 = require('gulp-base64-inline');

/**
 * Converts svg and image files to base64
 */

gulp.task('assets', function () {

return gulp.src('assets/scss/*.scss')
    .pipe(base64('/assets/../../'))
    .pipe(gulp.dest('assets/styles'));

});

usage inside scss, css: background-image: inline(path/to/image.jpg);

Leave a comment