When attempting to start my project, I encountered the following error message (
You may need an appropriate loader to handle this file type.
) for .eot
, .woff
, .ttf
, and .svg
files:
ERROR in ./src/styles/fonts/nm/icons/nm-icons.svg?aaf8685e87a6901c76c52d0018389547
Module parse failed: C:\BaseProject\src\styles\fonts\nm\icons\nm-icons.svg?aaf8685e87a6901c76c52d0018389547 Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (1:0)
at Parser.pp$4.raise (C:\BaseProject\node_modules\webpack\node_modules\acorn\dist\acorn.js:2221:15)
at Parser.pp.unexpected (C:\BaseProject\node_modules\webpack\node_modules\acorn\dist\acorn.js:603:10)
at Parser.pp$3.parseExprAtom (C:\BaseProject\node_modules\webpack\node_modules\acorn\dist\acorn.js:1822:12)
...
... (additional lines of error messages)
I also encountered similar errors for three other types of files.
Here is a look at my configuration files:
webpack.config.dev.js:
import webpack from 'webpack';
import path from 'path';
...
... (content of webpack config continues)
.babelrc:
{
"presets": [
"es2015",
"react",
"stage-1"
],
"env": {
"development": {
"presets": [
"react-hmre"
]
}
}
}
package.json: (selected dependencies listed)
{
"name": "project",
"version": "0.1.0",
...
... (selected content of package.json)
Any thoughts or suggestions on how to resolve these issues?