grafana/scripts/webpack/dependencies.js
kay delaney bad048b7ba
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00

15 lines
368 B
JavaScript

'use strict';
const pkg = require('../../package.json');
const { pull } = require('lodash');
let dependencies = Object.keys(pkg.dependencies);
// remove jquery so we can add it first
// remove rxjs so we can only depend on parts of it in code
pull(dependencies, 'jquery', 'rxjs');
// add jquery first
dependencies.unshift('jquery');
module.exports = dependencies;