-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
I'm using webpack (with babel-loader), and get this error when I import react-geocoder:
ERROR in ./~/react-geocoder/index.js
Module parse failed: /Users/me/project/node_modules/react-geocoder/index.js Line 9:
Unexpected token (
You may need an appropriate loader to handle this file type.
| */
| var Geocoder = React.createClass({
| getDefaultProps() {
| return {
| endpoint: 'https://api.tiles.mapbox.com',
@ ./static/app/scripts/components/ListProperty/ListPropertyLocationField.jsx 25:21-46
This is most likely a webpack config problem, but I'm hoping someone here knows how to help. My webpack config:
var config = {
entry: './static/app/scripts/main.js',
output: {
path: __dirname,
filename: 'main.js'
},
debug : isDev,
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel'
}]
}
};