Skip to content

SVG created is blank  #499

@Zombiemx

Description

@Zombiemx

Hi all,

I just tried to create an sprite with some svg images but, the svg is all white in the code is there but cannot see any icon there,

my webpack config is this one

`const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const SpriteLoaderPlugin = require("svg-sprite-loader/plugin");

module.exports = merge(common, {
mode: 'development',
module: {
rules: [
{
test: /.(js|jsx)$/,
loader: "babel-loader",
exclude: /node_modules/,
options: {
cacheDirectory: true
}
},
{
test: /.svg$/,
loader: "svg-sprite-loader",
include: path.resolve(__dirname, 'src/icons'),
options: {
extract: true,
spriteFilename: "../src/icons/images.svg"
}
},
{ test: /.css$/, use: [ 'style-loader', 'css-loader' ] },

  ],

},
plugins: [
new SpriteLoaderPlugin()
],
});`

tks for the help !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions