Skip to content

Commit

Permalink
[webpack] enforce using elasticsearch-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Feb 5, 2016
1 parent 05392a7 commit 811991b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"commander": "2.8.1",
"css-loader": "0.17.0",
"d3": "3.5.6",
"elasticsearch": "8.0.1",
"elasticsearch-browser": "8.0.1",
"elasticsearch": "10.0.1",
"elasticsearch-browser": "10.0.1",
"expiry-js": "0.1.7",
"exports-loader": "0.6.2",
"expose-loader": "0.7.0",
Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/es.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'elasticsearch-browser/elasticsearch.angular.js';
import 'elasticsearch-browser';
import _ from 'lodash';
define(function (require) {

var es; // share the client amoungst all apps
require('ui/modules')
.get('kibana', ['elasticsearch', 'kibana/config'])
Expand Down
3 changes: 3 additions & 0 deletions webpackShims/elasticsearch-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require('angular');
module.exports = require('elasticsearch-browser/elasticsearch.angular.js');
require('ui/modules').get('kibana', ['elasticsearch']);
5 changes: 2 additions & 3 deletions webpackShims/elasticsearch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
require('angular');
module.exports = require('node_modules/elasticsearch/elasticsearch.angular.min');
require('ui/modules').get('kibana', ['elasticsearch']);
module.exports = false;
throw new Error('The elasticsearch npm module is not designed for use in the browser. Please use elasticsearch-browser');

0 comments on commit 811991b

Please sign in to comment.