Code Monkey home page Code Monkey logo

Comments (8)

bbugh avatar bbugh commented on June 1, 2024 1

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.

SouroucheB avatar SouroucheB commented on June 1, 2024

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.

SouroucheB avatar SouroucheB commented on June 1, 2024

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.

bbugh avatar bbugh commented on June 1, 2024

@SouroucheB can you post your whole webpack config?

from webfonts-loader.

mrzdevcore avatar mrzdevcore commented on June 1, 2024

Did anyone tried it on webpack 4 ? I have the same issue also.

from webfonts-loader.

jeerbl avatar jeerbl commented on June 1, 2024

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.

YonathanB avatar YonathanB commented on June 1, 2024

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.

jeerbl avatar jeerbl commented on June 1, 2024

Closing cause inactivity

from webfonts-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.