From 49ab09101b00e4981b35875dda4d7da154222bd0 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 25 Jul 2017 13:57:29 -0700 Subject: [PATCH] Fixing the damn build (#3179) * Fixing the build * Going deeper --- superset/assets/javascripts/modules/superset.js | 2 +- superset/assets/package.json | 3 +-- superset/assets/visualizations/treemap.js | 2 +- superset/assets/webpack.config.js | 13 +++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/superset/assets/javascripts/modules/superset.js b/superset/assets/javascripts/modules/superset.js index 55af823117c4e..eccdda4a312f7 100644 --- a/superset/assets/javascripts/modules/superset.js +++ b/superset/assets/javascripts/modules/superset.js @@ -8,7 +8,7 @@ import { QUERY_TIMEOUT_THRESHOLD } from '../constants'; const utils = require('./utils'); -/* eslint wrap-iife: 0*/ +/* eslint wrap-iife: 0 */ const px = function () { let slice; function getParam(name) { diff --git a/superset/assets/package.json b/superset/assets/package.json index ff4c161ad6e11..055d9fd0fd1bd 100644 --- a/superset/assets/package.json +++ b/superset/assets/package.json @@ -57,7 +57,6 @@ "jquery": "^3.2.1", "jsdom": "9.12.0", "lodash.throttle": "^4.1.1", - "mapbox-gl": "^0.26.0", "moment": "^2.14.1", "mustache": "^2.2.1", "nvd3": "1.8.5", @@ -72,7 +71,7 @@ "react-dom": "^15.5.1", "react-gravatar": "^2.6.1", "react-grid-layout": "^0.14.4", - "react-map-gl": "^1.7.0", + "react-map-gl": "^2.0.3", "react-redux": "^5.0.2", "react-resizable": "^1.3.3", "react-select": "1.0.0-rc.3", diff --git a/superset/assets/visualizations/treemap.js b/superset/assets/visualizations/treemap.js index f728985dba5cd..3243dba472281 100644 --- a/superset/assets/visualizations/treemap.js +++ b/superset/assets/visualizations/treemap.js @@ -1,4 +1,4 @@ -/* eslint-disable no-shadow, no-param-reassign, no-underscore-dangle, no-use-before-define*/ +/* eslint-disable no-shadow, no-param-reassign, no-underscore-dangle, no-use-before-define */ import d3 from 'd3'; import { category21 } from '../javascripts/modules/colors'; diff --git a/superset/assets/webpack.config.js b/superset/assets/webpack.config.js index be8c8c983b9cb..6b80952c90930 100644 --- a/superset/assets/webpack.config.js +++ b/superset/assets/webpack.config.js @@ -10,6 +10,9 @@ const APP_DIR = path.resolve(__dirname, './'); const BUILD_DIR = path.resolve(__dirname, './dist'); const config = { + node: { + fs: 'empty', + }, entry: { 'css-theme': APP_DIR + '/javascripts/css-theme.js', common: APP_DIR + '/javascripts/common.js', @@ -32,9 +35,7 @@ const config = { ], alias: { webworkify: 'webworkify-webpack', - 'mapbox-gl/js/geo/transform': path.join( - __dirname, '/node_modules/mapbox-gl/js/geo/transform'), - 'mapbox-gl': path.join(__dirname, '/node_modules/mapbox-gl/dist/mapbox-gl.js'), + 'mapbox-gl$': path.join(__dirname, '/node_modules/mapbox-gl/dist/mapbox-gl.js'), }, }, @@ -57,10 +58,10 @@ const config = { ], }, }, - /* for react-map-gl overlays */ + /* for mapbox-gl/js/geo/transform */ { - test: /\.react\.js$/, - include: APP_DIR + '/node_modules/react-map-gl/src/overlays', + test: /\.js$/, + include: APP_DIR + '/node_modules/mapbox-gl/js', loader: 'babel-loader', }, /* for require('*.css') */