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

Using font awesome #295

Closed
scwood opened this issue Jul 30, 2016 · 7 comments
Closed

Using font awesome #295

scwood opened this issue Jul 30, 2016 · 7 comments
Milestone

Comments

@scwood
Copy link

scwood commented Jul 30, 2016

I've upgraded to 0.2.0 which I think was supposed to fix this.

Importing bootstrap works just fine.

# index.js
import 'font-awesome/css/font-awesome.css'
Compiling...                                                                                                                                                                                           [0/0]
Failed to compile.

Error in ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3 Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '�' (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:243-294

Error in ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:4)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:412-465

Error in ./~/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:4)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:495-547

Error in ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3 Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:576-627

Error in ./~/font-awesome/fonts/fontawesome-webfont.svg?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.svg?v=4.6.3 Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:660-711
@insin
Copy link
Contributor

insin commented Jul 30, 2016

Fix: the loaders for font resources need a (\?v=\d+\.\d+\.\d+)? on the end of their RegExps.

@gaearon
Copy link
Contributor

gaearon commented Jul 30, 2016

Woah, I didn't know. Happy to accept a fix.

@gaearon gaearon added this to the 0.3.0 milestone Jul 30, 2016
@alexzherdev
Copy link
Contributor

Yup, just recently stumbled upon this independently on my project. Happy to provide a fix 😃 if no one has started on this.

@gaearon
Copy link
Contributor

gaearon commented Aug 1, 2016

This should be fixed in the new version. Can you please verify? Please find the upgrade instructions here.

@gaearon gaearon modified the milestones: 0.2.1, 0.3.0 Aug 1, 2016
@scwood
Copy link
Author

scwood commented Aug 2, 2016

Yep, everything is working!

@ickyrr
Copy link

ickyrr commented Jan 17, 2017

+1
Thanks @insin !

@neelendu25
Copy link

I am very new to react in fact front end .. can you please help me with loader syntax to include (?v=\d+.\d+.\d+)? in loaders
module: {
loaders: [
{ test: /.js$/, loaders: ['babel'], exclude: /node_modules/ }
]
}
}

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants