Skip to content

Commit

Permalink
Include JS for *just* the bootstrap components we use
Browse files Browse the repository at this point in the history
This reduces our bundle size from 488 KB to 452 KB with barely
any effort on our part

Ref #1373
  • Loading branch information
yuvipanda committed Sep 24, 2021
1 parent a5aca2c commit b448363
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion binderhub/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import ClipboardJS from 'clipboard';
import 'bootstrap';
import 'event-source-polyfill';

import BinderImage from './src/image';
Expand All @@ -22,8 +21,12 @@ import { getPathType, updatePathText } from './src/path';
import { nextHelpText } from './src/loading';

import 'xterm/css/xterm.css';

// Include just the bootstrap components we use
import 'bootstrap/js/dropdown';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/css/bootstrap-theme.min.css';

import '../index.css';

const BASE_URL = $('#base-url').data().url;
Expand Down

0 comments on commit b448363

Please sign in to comment.