Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors loading ionicons.css #18

Closed
speigg opened this issue Sep 8, 2014 · 10 comments
Closed

Errors loading ionicons.css #18

speigg opened this issue Sep 8, 2014 · 10 comments

Comments

@speigg
Copy link

speigg commented Sep 8, 2014

ERROR in ./ionicons-1.5.2/fonts/ionicons.eot?v=1.5.2
Module parse failed: /***/ionicons-1.5.2/fonts/ionicons.eot?v=1.5.2 Line 1: Unexpected token ILLEGAL
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/css-loader!./ionicons-1.5.2/css/ionicons.css 2:300-340 2:356-396

ERROR in ./ionicons-1.5.2/fonts/ionicons.woff?v=1.5.2
Module parse failed: /***/ionicons-1.5.2/fonts/ionicons.woff?v=1.5.2 Line 1: Unexpected token ILLEGAL
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/css-loader!./ionicons-1.5.2/css/ionicons.css 2:515-556

etc...

@sokra
Copy link
Member

sokra commented Sep 9, 2014

You may need an appropriate loader to handle this file type.

module: {
  loaders: [
    { test: /\.(eot|woff)$/, loader: "file-loader" }
  ]
}

@speigg
Copy link
Author

speigg commented Sep 9, 2014

Oh interesting. Okay. I assumed the css loader alone would pull all of it's dependencies. I'll try that.

@ruanwz
Copy link

ruanwz commented Sep 14, 2014

for the "?v=xxx" suffix, you'd need to use this regular expression:
{ test: /.ttf([?]?.*)$/, loader: "file-loader" }

@sokra sokra closed this as completed Sep 22, 2014
@ghost
Copy link

ghost commented Jan 7, 2015

The following loaders worked for me

{ test: /\.woff$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" },
{ test: /\.ttf$/,  loader: "url-loader?limit=10000&mimetype=application/octet-stream" },
{ test: /\.eot$/,  loader: "file-loader" },
{ test: /\.svg$/,  loader: "url-loader?limit=10000&mimetype=image/svg+xml" }

@timuric
Copy link

timuric commented Aug 31, 2015

Following worked for me

{
    test   : /\.woff/,
    loader : 'url?prefix=font/&limit=10000&mimetype=application/font-woff'
}, {
    test   : /\.ttf/,
    loader : 'file?prefix=font/'
}, {
    test   : /\.eot/,
    loader : 'file?prefix=font/'
}, {
    test   : /\.svg/,
    loader : 'file?prefix=font/'
}

@jacobhamblin
Copy link

this works for me:

{
       test   : /\.woff|\.woff2|\.svg|.eot|\.ttf/,
       loader : 'url?prefix=font/&limit=10000'
}

@gaokun
Copy link

gaokun commented Aug 2, 2016

this works for me:

{ test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/, loader: "file-loader" },

this is good for font-awesome

@showd0wn
Copy link

{
test: /.woff|.woff2|.svg|.eot|.ttf/,
use: 'url-loader?prefix=font/&limit=10000'
}

for webpack2

@darincardin
Copy link

Wow! An answer that actually works! Thank you very much sokra.

@Liwoke
Copy link

Liwoke commented Nov 27, 2017

hi,this is the error i meet,someone can help me?

WARNING in ./src/assets/logo.png
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./src ^./(?!main(.js)?$)
@ ./test/unit/index.js
27 11 2017 08:56:29.940:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
27 11 2017 08:56:29.943:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
27 11 2017 08:56:29.950:INFO [launcher]: Starting browser PhantomJS
27 11 2017 08:56:33.035:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket l4a2fk1nyYQTqU1MAAAA with id 49733607
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
SyntaxError: Unexpected token ')'
at test/unit/index.js:826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants