mapbox / mapbox/react-geocoder

trouble with webpack

オープン
#12 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
JavaScript
スター
136
フォーク
61
PR マージ指標
30日以内にマージされた PR はありません

説明

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'
}]
}
};
```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

webpack 設定と react-geocoder/index.js の失敗している import から始め、static/app/scripts/components/ListProperty/ListPropertyLocationField.jsx と static/app/scripts/main.js を再現経路として使用します。報告されている webpack ビルドを実行し、react-geocoder の import がモジュール解析エラーなしでコンパイルされることを確認します。特定のテストについては言及されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react, webpack
領域
build-system, frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。