diff --git a/.storybook/main.js b/.storybook/main.js index 3403b5a642..1fbd6085a1 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -23,6 +23,7 @@ const addPackagesDir = config => { rule.oneOf.forEach(nestedRule => { if (nestedRule.loader && nestedRule.loader.includes('babel-loader')) { nestedRule.include.push(path.resolve(__dirname, '../packages')); + nestedRule.include.push(path.resolve(__dirname, '../node_modules/simplebar')); if (isIeMode && nestedRule.options && nestedRule.options.presets) { nestedRule.options.sourceType = 'unambiguous'; diff --git a/package.json b/package.json index c7d1dc7cde..259913597b 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "@popperjs/core": "^2.3.3", "classnames": "^2.2.6", "compute-scroll-into-view": "^1.0.13", - "core-js": "^3.0.1", "date-fns": "^2.16.1", "downshift": "^5.4.7", "element-closest": "^3.0.2", @@ -86,7 +85,7 @@ "react-transition-group": "^4.4.1", "react-virtual": "^2.3.2", "recharts": "^2.1.2", - "simplebar": "^5.3.6", + "simplebar": "^5.3.8", "swiper": "^6.8.2", "react-virtuoso": "^2.12.0", "text-mask-core": "^5.1.2", diff --git a/packages/scrollbar/package.json b/packages/scrollbar/package.json index fef4534a01..006e2c0423 100644 --- a/packages/scrollbar/package.json +++ b/packages/scrollbar/package.json @@ -23,11 +23,11 @@ "@juggle/resize-observer": "^3.3.1", "can-use-dom": "^0.1.0", "classnames": "^2.2.6", - "core-js": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.memoize": "^4.1.2", "lodash.throttle": "^4.1.1", - "react-merge-refs": "1.1.0" + "react-merge-refs": "1.1.0", + "simplebar": "^5.3.8" }, "devDependencies": { "@types/lodash.throttle": "^4.1.7" diff --git a/packages/scrollbar/src/Component.tsx b/packages/scrollbar/src/Component.tsx index c49a2c97f4..95c2a0d36b 100644 --- a/packages/scrollbar/src/Component.tsx +++ b/packages/scrollbar/src/Component.tsx @@ -1,7 +1,7 @@ import React, { HTMLAttributes, useEffect, useRef } from 'react'; import cn from 'classnames'; import mergeRefs from 'react-merge-refs'; -import SimpleBar from 'simplebar/dist/simplebar-core.esm'; +import SimpleBar from 'simplebar/src/simplebar'; import throttle from 'lodash.throttle'; import styles from './index.module.css'; diff --git a/rollup.config.js b/rollup.config.js index 69aac110ec..093b8b0011 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -34,12 +34,7 @@ const baseConfig = { '!src/**/*.d.ts', ], plugins: [wildcardExternal(['@alfalab/core-components-*/*'])], - external: [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.peerDependencies || {}), - /(core-js).+/, - ], - plugins: [wildcardExternal(['@alfalab/core-components-*/*'])], + external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})], }; const multiInputPlugin = multiInput(); diff --git a/typings/simplebar.d.ts b/typings/simplebar.d.ts index 87433112c6..97fd70d7a5 100644 --- a/typings/simplebar.d.ts +++ b/typings/simplebar.d.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -declare module 'simplebar/dist/simplebar-core.esm' { +declare module 'simplebar/src/simplebar' { declare namespace SimpleBar { interface KnownClassNamesOptions { contentEl?: string; diff --git a/yarn.lock b/yarn.lock index 6fd2bdc127..2951373ed5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23143,7 +23143,7 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -simplebar@^5.3.6: +simplebar@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/simplebar/-/simplebar-5.3.8.tgz#4c133596780756a8170682d7fd8bfd23ea5220ab" integrity sha512-LOHjyOcihx++zFN+vuktoZBGpCarFCtHIVDWXOf2VELbGDknq3Hw/sddafRp1aCg123VNkHWOFHUDHYEXAtufQ==