Font awesome configuration and loading package for webpack, using font-awesome (Sass).
- Based on font-awesome-webpack (gowravshekar)
Webpack Loader for Font Awesome Using Sass
License: MIT License
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?
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).
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:
Instead of going through an entry, you could try
[
{
test: /font-awesome\.config\.js/
use: [
{ loader: "style-loader", options: { ... } },
{ loader: "font-awesome-loader" }
]
}
]
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 identmy-ident
.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.