mapbox / mapbox/react-geocoder
trouble with webpack
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 136
- Fork
- 61
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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'
}]
}
};
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với cấu hình webpack và import bị lỗi trong react-geocoder/index.js, sử dụng static/app/scripts/components/ListProperty/ListPropertyLocationField.jsx và static/app/scripts/main.js làm đường dẫn tái hiện. Chạy bản build webpack được báo cáo và xác minh rằng việc import react-geocoder được biên dịch mà không có lỗi phân tích module; không có test cụ thể nào được đề cập.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react, webpack
- Lĩnh vực
- build-system, frontend
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100