Comments (8)
I'm on Webpack 4 as well, and since ExtractTextPlugin is soft deprecated with WP4 I figured that was part of the problem.
I spent several hours trying to get every font generation package I could find working until landing on
https://www.npmjs.com/package/iconfont-webpack-plugin. It worked out of the box without a bunch of shenanigans, and it was coincidentally my favorite API, very simple. It adds a custom postcss loader and a custom font-icon
css property, then turns them all into a font. Here's my setup for it: https://gist.github.com/bbugh/bcc14a4e9266a5e6578c849b39f35dcd
from webfonts-loader.
I'm experimenting the exact same issue and the exact same frustration. I can not figure out how to access my icons through my react app ! The worst is that you asked your question almost 2 months ago and nobody has given you an answer or a help at least :( !
from webfonts-loader.
I've founded a way :
.addLoader({ test: /\.font\.js/, loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: [ 'css-loader?importLoaders=1', 'webfonts-loader', ], }), })
and :
const path = require('path'); module.exports = { files: ['./assets/fonts/*.svg'], fontName: 'myfonticons', classPrefix: 'myfonticon-', baseSelector: '.myfonticon', cssTemplate: path.resolve('node_modules/webfonts-generator/templates/css.hbs'), types: ['eot', 'woff', 'woff2', 'ttf', 'svg'], fileName: 'app.[fontname].[hash].[ext]', embed: true, };
from webfonts-loader.
@SouroucheB can you post your whole webpack config?
from webfonts-loader.
Did anyone tried it on webpack 4 ? I have the same issue also.
from webfonts-loader.
Tried with Webpack 4 and it works fine with me, look at the tests in the repo, it might be of help ;)
from webfonts-loader.
It doesn't downloading the fonts.
I can see the css files with my desired configuration, but fonts aren't downloaded.
In html I have a little square.
Any help?
from webfonts-loader.
Closing cause inactivity
from webfonts-loader.
Related Issues (20)
- scssFile and cssDest options are simply being ignored. HOT 2
- Do not use github-sponsors dependency HOT 2
- Exported Codepoints/SCSS Ignore startCodepoint Setting/emitCodepoints Values HOT 4
- error when production build with webpack 5 HOT 1
- Override icons with the same name HOT 2
- HTML file not generated HOT 7
- Working in Gatsby? HOT 1
- vue cli not extract css HOT 1
- Security issue: Misinterpretation of malicious XML input HOT 3
- Probably lost support for SCSS files inclusion/variables HOT 2
- There's no option for "@font-face only" HOT 3
- Installation seems very hard, need a video tutorial HOT 1
- writeUint32LE is not function HOT 3
- scssFile and cssDest options are simply being ignored because writeFiles is set to false HOT 1
- cssFontsUrl should be URL and not path HOT 1
- Converting svg with multiple paths into font. HOT 1
- SASS mixins are not available HOT 2
- Upgrading from 5 to 8 - what changed? (Rectangular icons) HOT 3
- Is possible to keep font values? HOT 1
- Icons are rendered as bold HOT 1
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 webfonts-loader.