-
Notifications
You must be signed in to change notification settings - Fork 82
Module build failed: SyntaxError: Unexpected token m #13
Comments
I ended up using raw-loader and loading my file like this: {
test: /\.json$/,
loader: 'raw-loader'
} |
@cheshire137 I ran into the same issue today and for me at least, it was because I wasn't escaping double quotes like
I also ran into an issue with using ES6 |
I ran into the same issue as well with json-loader. |
Can confirm #11 fixes this issue... |
I got the same error. Any news on this issue? Can also confirm #11 fixes this, why didn't it get merged? |
I have the same issue |
This issue occurs when applying the json-loader twice. i. e. by using configuration + |
Thanks @sokra ! Removing |
In case anyone is still having an issue with this loader, I got it to work by adding and extra Ex: |
Not sure if this is the only option but it worked with the following code: - `import/require` - `import Data from '!json!../../data';` - Loader: `{ test: /\.json$/, loaders: ['json-loader'] }` - From: https://github.com/webpack/webpack/tree/master/examples/loader
I fixed this issue by moving |
When #11 will be merged to not checkout git repo? |
+1 |
Switching to fork compact-json-loader helped me :) |
I had to remove the "json!" and then it worked. |
This is what I'm getting:
The relevant JSON file I'm trying to load:
I'm requiring it via
var Config = require('./config.json');
. I had the same error when I didrequire('json!./config.json')
.I have this in my list of
loaders
:I got the same error when I moved the loader to the
preLoaders
section.This is the version I'm using:
"json-loader": "^0.5.4"
.The text was updated successfully, but these errors were encountered: