Comments (7)
@alex-shamshurin: just a little ping, if you can describe in more detail what the problem is, I'd be happy to take a look at it.
from svg-url-loader.
If you look at the source code, it has an additional requirement: your content needs to have a style
tag.
from svg-url-loader.
No matter, IE11 does not work with SVG class
too. It must not be inlined to support IE11. This option should fix it without other conditions.
from svg-url-loader.
@kgram, as an author of iesafe
option, do you have any thoughts on this?
from svg-url-loader.
@alex-shamshurin: I don't understand what aspect of classes you would expect to work without a style-tag. Is the problem internal references to masks or something?
I wasn't aware of any broken features besides style-tags, so I made a check to avoid unnecessary bailouts. In my defense, I did document it under the option description ("[..]if the file contains a style-element and the encoded size is above 4kB[..]"). Can you possibly post an example of an SVG that doesn't work (possibly with path-data removed if it's sensitive, hopefully the problem will still be visible)? It's possible the style-tag check should just be removed to be completely safe.
from svg-url-loader.
hi, @kgram The svg has style tag, but in ie11, it's has been convert to inline data-url svg and only has black color. I expect it fallback to fileloader.
The loader option:
{
test: /\.(svg)$/,
use: [{
loader: 'svg-url-loader',
options: {
limit: 10000,
iesafe: true,
encoding: 'base64'
}
}]
},
Regards.
from svg-url-loader.
I had expected some sort of weird IE behaviour when using base64, but it turned out to be plain stupidity from myself. When I wrote the feature I forgot that .
in regex does't match line breaks. All my generated examples are without extra whitespace and everywhere I use the loader myself I have it placed after an optimiser that strips the extra whitespace, so I've never noticed it.
I'm sorry for any trouble my oversight has caused. The good news is that until a new release is ready the problem should be fixable by placing an optimiser-loader such as svgo-loader before the svg-url-loader.
from svg-url-loader.
Related Issues (20)
- How to use this in html? HOT 2
- Images svg aren't loading, how to fix? HOT 2
- Incorrectly escapes # in style-element HOT 3
- Question: is there a way to disable plugin inline for few SVG? HOT 1
- Update README to include webpack options configuration for supported parameters HOT 2
- problem with `file-loader` and deps HOT 15
- The benefits of data:xyz style vs. SVG sprites HOT 1
- [Proposal] Add option to skip some phrase during encoding HOT 1
- Issues to find SVGs inside imported sass files. HOT 1
- Please update `file-loader` to latest version HOT 14
- Incorrect Data URI content when using issuer test HOT 2
- Doesn't working on image tag HOT 2
- Missing webpack in peerDependencies for yarn@2 compatibility HOT 1
- Please Add CHANGELOG.md HOT 1
- Action Required: Fix Renovate Configuration
- [Webpack]Error report of introducing SVG file into img tag ? Please refer to the screenshot. HOT 13
- "module export" instead of svg directly HOT 6
- Dependency Dashboard
- Malformed svg produced HOT 3
- Svg is abstracted from css file. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg-url-loader.