JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 271 forks source link

[object Module] error #298

Open in4in-dev opened 6 years ago

in4in-dev commented 6 years ago

Hello! default I see this in my css-files after processing. How to fix it?

node v10.8.0 npm v6.2.0 svg-sprite-loader v3.8.0 or any other

The project is big, I tried to pull out the right part: https://gist.github.com/In4inQ/6e3b4533856961dae6f4785a63624525

dkhuntrods commented 6 years ago

Also seeing the same issue: node v8.11.4 npm 6.4.0 svg-sprite-loader 3.9.2

My project is fairly small and simple, and seeing the same issue. For reference, it's also using post-css.

kisenka commented 5 years ago

@in4in-dev I'am getting 404 error when trying to check your link

GatoPresto commented 5 years ago

hey guys I have the same problem.

check my config file pls: https://gist.github.com/GatoPresto/f7eea501058d10aedafc0c7ed05f92e2

GatoPresto commented 5 years ago

hello @kisenka, please check my example above when you have some time thank you

ceojoe1 commented 5 years ago

I had the same issue I added esModule: false in the test: /.svg$/ { } object. View code below.

{ test: /.svg$/, use: [ { loader: 'svg-sprite-loader', options: { symbolId: '[name]_[hash]', extract: true, prefixize: true, esModule: false } }, { loader: 'svgo-loader', options: { plugins: [ { removeTitle: true }, { convertColors: { shorthex: false } }, { convertPathData: false } ] } } ] },

ceojoe1 commented 5 years ago

@GatoPresto ^^

The next issue I'm having is, the absolute path to my svgs aren't actually rendering the svgs.. Can you let me know if you're seeing the same issue with yours?

kisenka commented 5 years ago

@GatoPresto I need a fully reproducible demo, with package.json, webpack config, SVGs and piece of your CSS code, which is imports SVGs

GatoPresto commented 5 years ago

@ceojoe1 and @kisenka thank you for answer. I have a lot of work right now. I'll answer as soon as I can.

strukove commented 5 years ago

@GatoPresto I need a fully reproducible demo, with package.json, webpack config, SVGs and piece of your CSS code, which is imports SVGs

Hey, We have the same problem when we setup vue cli 3 project. Check this demo please, https://github.com/strukove/svg-sprite-loader-error

gzaripov commented 5 years ago

The same for webpack 4.20.2, although esModule property helps I dont think it is appropriate solution.

strukove commented 5 years ago

@GatoPresto I need a fully reproducible demo, with package.json, webpack config, SVGs and piece of your CSS code, which is imports SVGs

Hi kisenka. Have you checked my last commenti with "fully reproducible demo"? Is there something wrong?

andreyy4 commented 5 years ago

I had the same "bug" when I used the html-loader without the text exstract plugin