Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc slider generates 4mb build #1034

Open
abocanegrab opened this issue Sep 2, 2024 · 0 comments
Open

rc slider generates 4mb build #1034

abocanegrab opened this issue Sep 2, 2024 · 0 comments

Comments

@abocanegrab
Copy link

I have a project using library rc-slider, internally has a dependency with classnames.

Reviewing my build I saw an unnecessary size of the js. Reviewing deeper with source-map-explorer package, I found I have a 4mb classnames js file.

image

This is my package json file:

{"dependencies": { "aws-amplify": "^6.5.3", "aws-sdk": "^2.1687.0", "build": "^0.1.4", "crypto": "^1.0.1", "html-react-parser": "^5.1.15", "js-cookie": "^3.0.5", "jwt-decode": "^4.0.0", "lodash.throttle": "^4.1.1", "moment": "^2.30.1", "moment-timezone": "^0.5.45", "path-browserify": "^1.0.1", "rc-slider": "^11.1.5", "react": "^18.3.1", "react-detect-click-outside": "^1.1.7", "react-dom": "^18.3.1", "react-icons": "^5.3.0", "react-router-dom": "^6.26.1", "react-select": "^5.8.0", "react-toastify": "^10.0.5", "zod": "^3.22.4" }, "devDependencies": { "@fullhuman/postcss-purgecss": "^6.0.0", "@types/js-cookie": "^3.0.6", "@types/lodash.throttle": "^4.1.9", "@types/node": "^22.5.2", "@types/react": "^18.3.5", "@types/react-dom": "^18", "@types/react-slider": "^1.3.6", "autoprefixer": "^10.4.20", "husky": "^9.1.5", "lint-staged": "^15.2.10", "postcss": "^8.4.44", "postcss-cli": "^11.0.0", "prettier": "^3.3.3", "react-app-rewired": "^2.2.1", "react-scripts": "^5.0.1", "tailwindcss": "^3.4.10", "terser-webpack-plugin": "^5.3.10", "typescript": "^5.5.4" }}
I tried many ways, but the build don't reduce the size.

Somebody could give me some guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant