Coder Social home page Coder Social logo

font-awesome-loader's Introduction

font-awesome-loader

npm version

Font awesome configuration and loading package for webpack, using font-awesome (Sass).

Usage


Credits

  • Based on font-awesome-webpack (gowravshekar)

font-awesome-loader's People

Contributors

charsleysa avatar diondirza avatar justin808 avatar ldenman avatar rayd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

font-awesome-loader's Issues

Not compatible with ExtractTextWebpack 2.0.0

Been using this config with extract-text-webpack-plugin

module.exports = {
  styleLoader: require('extract-text-webpack-plugin').extract({
    fallback: 'style-loader',
    use: ['css-loader', 'sass-loader'],
  }),
  styles: {
    'mixins': true,
    ...
  },
};

was working fine before, until the update then it produces an error with following message:

ERROR in ./~/font-awesome-loader/index.loader.js!./internal/webpack/font-awesome.config.js
Module not found: Error: Can't resolve '[object Object],[object Object],[object Object]' in '/Users/diondirza/Projects/Site/midtrans/lemonade/internal
/webpack'
 @ ./~/font-awesome-loader/index.loader.js!./internal/webpack/font-awesome.config.js 1:0-261
 @ multi regenerator-runtime/runtime bootstrap-loader/extractStyles font-awesome-loader!./internal/webpack/font-awesome.config.js ./src/client/index.j
s

Any clue to fix this?

Font awsome loader breaks in webpack 2.

screen shot 2016-07-25 at 14 43 52

It seems it can be simply prevented by changing

require("style!css!sass!./font-awesome-styles!./font-awesome.config.js");

to

require("style!css!sass!./font-awesome-styles.loader!./font-awesome.config.js");

in font-awesome-loader/index.js. This change wont break anything in older webpack versions. I checked on bootstrap-loader basic example, but it may impact other things I don't know of.

At the moment I'm blocked by this while working on Extract text plugin 2 support (It needs webpack 2) for bootstrap loader (I'm updating some of the dependencies in example projects).

Rework to work with webpack 2 better

Hi,

We've been reworking extract-text-webpack-plugin internals. Now extract (the loader) portion returns an object that can contain functions. That doesn't go well with font-awesome-loader and serializing to a string doesn't quite work as it's a lossy transformation.

I had a quick chat with Tobias about the topic and here are the recommendations we came up with:

Rework the Configuration Approach

Instead of going through an entry, you could try

[
  {
    test: /font-awesome\.config\.js/
    use: [
      { loader: "style-loader", options: { ... } },
      { loader: "font-awesome-loader" }
    ]
  }
]

Don't Stringify Queries

This is the current pain point. To quote Tobias:

For complex loader options you don't stringify the query. Instead you reference the ident of the options object. my-loader??my-ident will use the options object with the ident my-ident.

Conclusion

Let me know if there's anything to clarify. I would love to see this work completed so we can refer to it in how to port to the new internals.

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.