svgicon
svgicon copied to clipboard
Laravel mix configuration
Hi, i'm using this plugin successfully in one of my vue projects. Now i'm trying to use it in an Laravel project. But it's not working, an svg element is added to the code but it's empty. Furthermore, the used svg files are copied in to the public folder, but there is js inside of the svg files ...
I added the following to my webpack.mix.js:
mix.webpackConfig({
module: {
rules: [
{
test: /\.svg$/,
include: [svgFilePath],
use: [
{
loader: '@yzfe/svgicon-loader',
options: {
svgFilePath: [svgFilePath],
svgoConfig: null
}
}
]
}
]
},
...
})
mix.options({
vue: {
transformAssetUrls: {
['v2-icon']: 'data'
}
}
})
Does anyone has this plugin running with laravel mix?