mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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
15 lines
368 B
JavaScript
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;
|