mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Fix example and bump package in website (#891)
This commit is contained in:
parent
e631be6a8e
commit
d12d998c33
@ -69,7 +69,7 @@ export default class App extends Component {
|
||||
_renderControlPanel = () => {
|
||||
const features = this._editorRef && this._editorRef.getFeatures();
|
||||
let featureIndex = this.state.selectedFeatureIndex;
|
||||
if (featureIndex === null) {
|
||||
if (features && featureIndex === null) {
|
||||
featureIndex = features.length - 1;
|
||||
}
|
||||
const polygon = features && features.length ? features[featureIndex] : null;
|
||||
|
||||
@ -7,6 +7,12 @@
|
||||
"eslint-config-uber-jsx",
|
||||
"eslint-config-uber-es2015"
|
||||
],
|
||||
"overrides": [{
|
||||
"files": ["webpack/*.js"],
|
||||
"rules": {
|
||||
"import/no-extraneous-dependencies": 0
|
||||
}
|
||||
}],
|
||||
"rules": {
|
||||
"guard-for-in": 0,
|
||||
"camelcase": 0,
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
"prop-types": "^15.5.8",
|
||||
"react": "^16.3.0",
|
||||
"react-dom": "^16.3.0",
|
||||
"react-map-gl-draw": "^0.14.10",
|
||||
"react-map-gl-draw": "^0.15.0",
|
||||
"react-redux": "^4.4.5",
|
||||
"react-router": "^3.2.0",
|
||||
"redux": "^3.6.0",
|
||||
|
||||
@ -4,24 +4,17 @@ const {resolve} = require('path');
|
||||
const config = require('./config');
|
||||
|
||||
module.exports = Object.assign(config, {
|
||||
|
||||
mode: 'development',
|
||||
|
||||
entry: [
|
||||
'webpack-hot-middleware/client',
|
||||
'./src/main'
|
||||
],
|
||||
entry: ['webpack-hot-middleware/client', './src/main'],
|
||||
|
||||
devServer: {
|
||||
port: 3000,
|
||||
progress: true,
|
||||
contentBase: resolve(__dirname, '../src/static')
|
||||
contentBase: [resolve(__dirname, '../src/static'), resolve(__dirname, '../../')]
|
||||
},
|
||||
|
||||
devtool: 'cheap-source-maps',
|
||||
|
||||
plugins: config.plugins.concat([
|
||||
new webpack.HotModuleReplacementPlugin()
|
||||
])
|
||||
|
||||
plugins: config.plugins.concat([new webpack.HotModuleReplacementPlugin()])
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user