Optimized rc-slider imports

This commit is contained in:
muerwre 2019-03-08 11:03:20 +07:00
parent acfd5138df
commit a7ae059e4c
5 changed files with 17 additions and 2 deletions

View file

@ -1,6 +1,8 @@
{ {
"presets": ["env", "react","stage-2"], "presets": ["env", "react","stage-2"],
"plugins": [ "plugins": [
"ramda",
"lodash",
"react-hot-loader/babel", "react-hot-loader/babel",
"lodash", "lodash",
["transform-runtime", { ["transform-runtime", {

10
package-lock.json generated
View file

@ -1939,6 +1939,16 @@
"require-package-name": "^2.0.1" "require-package-name": "^2.0.1"
} }
}, },
"babel-plugin-ramda": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/babel-plugin-ramda/-/babel-plugin-ramda-2.0.0.tgz",
"integrity": "sha512-PZ/6fmNGshCU7Vt33JRWDDSQqZxOsav1DztZ+VBJFOamE3spyoKuIL9Ve0FQd/oXGlH5jHf/WrpCSGn0MR+YVw==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"ramda": "*"
}
},
"babel-plugin-syntax-async-functions": { "babel-plugin-syntax-async-functions": {
"version": "6.13.0", "version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",

View file

@ -22,6 +22,7 @@
"babel-eslint": "^8.2.3", "babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-plugin-ramda": "^2.0.0",
"babel-plugin-transform-runtime": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",

View file

@ -15,7 +15,8 @@ import {
import { isMobile } from '$utils/window'; import { isMobile } from '$utils/window';
import classnames from 'classnames'; import classnames from 'classnames';
import { Range } from 'rc-slider'; // import { Range } from 'rc-slider';
import Range from 'rc-slider/lib/Range';
import { TABS } from '$constants/dialogs'; import { TABS } from '$constants/dialogs';
import { Icon } from '$components/panels/Icon'; import { Icon } from '$components/panels/Icon';
import { pushPath } from '$utils/history'; import { pushPath } from '$utils/history';

View file

@ -3,7 +3,8 @@ import * as React from 'react';
import { toHours } from '$utils/format'; import { toHours } from '$utils/format';
import { Icon } from '$components/panels/Icon'; import { Icon } from '$components/panels/Icon';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Slider from 'rc-slider'; // import Slider from 'rc-slider';
import Slider from 'rc-slider/lib/Slider';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { setSpeed } from '$redux/user/actions'; import { setSpeed } from '$redux/user/actions';
import { IRootState } from "$redux/user/reducer"; import { IRootState } from "$redux/user/reducer";