ricardodorosario / react-horizontal-stacked-bar-chart

React horizontal stacked bar responsive chart component
MIT License
19 stars 10 forks source link

build fail #13

Closed kunchit closed 4 years ago

kunchit commented 4 years ago

Failed to minify the code from this file:

    ./node_modules/react-horizontal-stacked-bar-chart/umd/hsbar.min.js:9:73705

node v12.17.0

ricardodorosario commented 4 years ago

Hi @kunchit , could you please share the package.json of your project?

kunchit commented 4 years ago

@ricardodorosario sure { "name": "standard_platform", "version": "0.1.0", "private": true, "dependencies": { "@date-io/date-fns": "^1.3.13", "@dr-kobros/react-webfont-loader": "^8.0.0", "@fortawesome/fontawesome-svg-core": "^1.2.30", "@fortawesome/free-brands-svg-icons": "^5.14.0", "@fortawesome/free-solid-svg-icons": "^5.14.0", "@fortawesome/react-fontawesome": "^0.1.11", "@iconify/icons-ant-design": "^1.0.6", "@iconify/icons-bx": "^1.0.3", "@iconify/icons-carbon": "^1.0.3", "@iconify/icons-fa-solid": "^1.0.8", "@iconify/icons-feather": "^1.0.7", "@iconify/icons-ic": "^1.0.8", "@iconify/icons-mdi": "^1.0.123", "@iconify/icons-ri": "^1.0.1", "@iconify/icons-typcn": "^1.0.3", "@iconify/icons-uil": "^1.0.6", "@iconify/react": "^1.1.3", "@material-ui/core": "^4.9.6", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.46", "@material-ui/pickers": "^3.2.10", "@react-navigation/native": "^5.0.0", "@wojtekmaj/react-daterange-picker": "^3.0.0", "animated-number-react": "^0.1.1", "aos": "^3.0.0-beta.6", "apexcharts": "^3.15.5", "autoprefixer": "7.1.6", "autosuggest-highlight": "^3.1.1", "awesome-debounce-promise": "^2.1.0", "axios": "^0.18.0", "babel-core": "6.26.0", "babel-eslint": "7.2.3", "babel-jest": "20.0.3", "babel-loader": "7.1.2", "babel-plugin-lodash": "^3.3.2", "babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-preset-react-app": "^3.1.1", "babel-runtime": "6.26.0", "case-sensitive-paths-webpack-plugin": "2.1.1", "chalk": "1.1.3", "connected-react-router": "^6.7.0", "css-loader": "0.28.7", "date-fns": "^2.10.0", "debounce-promise": "^3.1.2", "dotenv": "4.0.0", "dotenv-expand": "4.2.0", "downshift": "^5.0.0", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", "eslint": "4.10.0", "eslint-config-react-app": "^2.1.0", "eslint-loader": "1.9.0", "eslint-plugin-flowtype": "2.39.1", "eslint-plugin-import": "2.8.0", "eslint-plugin-jsx-a11y": "5.1.1", "eslint-plugin-react": "7.4.0", "express-history-api-fallback": "^2.2.1", "extract-text-webpack-plugin": "3.0.2", "faker": "^4.1.0", "file-loader": "1.1.5", "fs-extra": "3.0.1", "google-maps-react": "^2.0.2", "helmet": "^3.21.3", "html-webpack-plugin": "2.29.0", "iconify": "^1.2.0", "immer": "^7.0.5", "jest": "20.0.4", "json-server": "^0.16.1", "less": "^3.0.1", "less-loader": "^4.1.0", "lodash": "^4.17.15", "material-ui-dropzone": "^3.3.0", "material-ui-icons": "^1.0.0-beta.36", "material-ui-next-pickers": "0.0.21", "material-ui-popup-state": "^1.5.3", "moment": "^2.24.0", "moment-range": "^4.0.2", "mui-datatables": "^2.14.0", "nock": "^9.2.3", "notistack": "^0.9.7", "object-assign": "4.1.1", "postcss-flexbugs-fixes": "3.2.0", "postcss-loader": "2.0.8", "promise": "8.0.1", "raf": "3.4.0", "react": "^16.2.0", "react-animate-on-scroll": "^2.1.5", "react-animations": "^1.0.0", "react-apexcharts": "^1.3.6", "react-async-hook": "^3.6.1", "react-autosuggest": "^9.4.3", "react-circular-progressbar": "^2.0.3", "react-csv": "^2.0.3", "react-data-table-component": "^6.3.1", "react-datepicker": "^2.14.1", "react-daterange-picker": "^2.0.1", "react-dates": "^21.8.0", "react-day-picker": "^7.4.0", "react-dev-utils": "^5.0.0", "react-dom": "^16.2.0", "react-dropzone": "^10.2.1", "react-grid-layout": "^0.17.1", "react-helmet": "^5.2.1", "react-horizontal-stacked-bar-chart": "^8.15.2", "react-hot-loader": "^4.0.0", "react-icons": "^3.9.0", "react-ionicons": "^3.1.4", "react-live-clock": "^4.0.5", "react-localization": "^1.0.15", "react-map-gl": "^5.2.5", "react-phone-input-2": "^2.11.0", "react-phone-number-input": "^2.3.23", "react-redux": "^7.2.0", "react-round-flags": "^1.0.5", "react-router-dom": "^4.2.2", "react-router-redux": "5.0.0-alpha.9", "react-select": "^3.0.8", "react-simple-maps": "^1.0.0-beta.0", "react-spinners": "^0.8.0", "react-text-mask": "^5.4.3", "redux": "^3.7.2", "redux-logger": "^3.0.6", "redux-mock-store": "^1.5.1", "redux-thunk": "^2.2.0", "rekit-core": "^2.3.0", "rekit-studio": "^2.3.0", "round-flags": "^1.0.0", "semantic-ui-react": "^0.88.2", "source-map-explorer": "^2.4.2", "style-loader": "0.19.0", "styled-components": "^5.0.1", "sw-precache-webpack-plugin": "0.11.4", "url-loader": "0.6.2", "use-lodash-debounce": "^1.1.0", "webpack": "3.8.1", "webpack-dev-server": "2.9.4", "webpack-manifest-plugin": "1.3.2", "whatwg-fetch": "2.0.3" }, "scripts": { "start": "node scripts/start.js", "build": "node scripts/build.js", "test": "node scripts/test.js --env=jsdom", "mock:api": "npx json-server --watch ./src/db.js --port 3030", "server:api": "nodemon ./server.js ", "analyze": "source-map-explorer 'build/static/js/*.js'" }, "rekit": { "devPort": 6075, "studioPort": 6076, "plugins": [], "css": "less" }, "jest": { "collectCoverageFrom": [ "src/*/.{js,jsx,mjs}" ], "setupFiles": [ "/config/polyfills.js", "/tests/setup.js" ], "testMatch": [ "/tests/*/.test.{js,jsx,mjs}" ], "testEnvironment": "node", "testURL": "http://localhost", "transform": { "^.+\.(js|jsx|mjs)$": "/node_modules/babel-jest", "^.+\.css$": "/config/jest/cssTransform.js", "^(?!.*\.(js|jsx|mjs|css|json)$)": "/config/jest/fileTransform.js" }, "transformIgnorePatterns": [ "[/\\]node_modules[/\\].+\.(js|jsx|mjs)$" ], "moduleNameMapper": { "^react-native$": "react-native-web" }, "moduleFileExtensions": [ "web.js", "mjs", "js", "json", "web.jsx", "jsx", "node" ] }, "eslintConfig": { "extends": "react-app" }, "description": "standard_platform created by Rekit.", "devDependencies": {} }

ricardodorosario commented 4 years ago

Nice, I'm thinking that it could be a build problem, so, I need to know also how is your webpack config. You are using scripts/build.js to config it. Could you share it too?

For a while, I suggest you to update the webpack(https://www.npmjs.com/package/webpack) version to the latest.

And according to the webpack docs, webpack v4+ is minifying the code by default.

If this works, please let me know.

kunchit commented 4 years ago

thank for suggest I will try to migrate webpack 3 to 4 later and this webpack.config my project http://collabedit.com/9p73g

ricardodorosario commented 4 years ago

Hi @kunchit I builded a simple project with your configurations with some updates in some dependencies and worked fine. That's the changes I'd made: just-a-test, maybe it can help you.

If this works, please let me know.

kunchit commented 4 years ago

@ricardodorosario Today I have migrate webpack 3 to 4 in my project . It build pass.