itinance / redux-saga-location

Geo-Location-support for redux-saga
MIT License
22 stars 8 forks source link

Module parse failed error #3

Open abcd-ca opened 7 years ago

abcd-ca commented 7 years ago

Hello,

I get this error when I try to import your package,

Module parse failed: /Users/foo/Documents/projects/foo/node_modules/redux-saga-location/reducer/location.js Unexpected token (14:8)
You may need an appropriate loader to handle this file type.
|     case REDUX_SAGA_LOCATION_ACTION_REQUEST: {
|       return {
|         ...state,
|         fetching: true
|       }
daviscabral commented 7 years ago

@abcd-ca I believe you can fix it by loading it with babel manually:

require('babel-node-modules')([
  'redux-saga-location' // add an array of module names here
])

I ended fixing this on other project this way.

brascene commented 6 years ago

@daviscabral , where should that require be placed? thanks!