G2Plot icon indicating copy to clipboard operation
G2Plot copied to clipboard

🤔 [QUESTION] 求助,打包压缩出现问题SyntaxError:: Unexpected token: name (index) [../~/@antv/g2plot/~/d3-hierarchy/dist/d3-hierarchy.js:107,0]

Open bigbigmyworld opened this issue 3 years ago • 0 comments

🐛 Question description [Please make everyone to understand it]

打包压缩出现问题SyntaxError:: Unexpected token: name (index) [../~/@antv/g2plot/~/d3-hierarchy/dist/d3-hierarchy.js:107,0]

💻 Link to minimal reproduction

Please provide a link by forking these links g2plot or GitHub repo. What is a minimal reproduction, and why is it required?

🏞 Expected result

打包成功

🚑 Any additional [like screenshots]

  • G2Plot Version:
  • Platform:
  • 关联打包脚本 if (this.env == "prd") { baseConfig.plugins.push( new this.webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) );

package.json { "dependencies": { "@ant-design/charts": "^1.3.6", "@antv/data-set": "^0.11.7", "@antv/util": "^2.0.17", "@craco/craco": "^6.3.0", "ahooks": "^3.3.8", "ajv": "^5.5.1", "ajv-i18n": "^2.2.0", "amqplib": "^0.6.0", "ansi-to-html": "^0.7.2", "autoprefixer": "^10.3.7", "axios": "^0.19.2", "axios-https-proxy-fix": "^0.17.1", "bizcharts": "^3.5.6", "compare-versions": "^3.4.0", "copy-to-clipboard": "3.0.8", "cpu-load": "^1.0.0", "crypto-js": "^3.3.0", "deep-extend": "^0.5.0", "deref": "^0.7.3", "docxtemplater": "^3.9.9", "easy-json-schema": "0.0.2-beta", "form-data": "^4.0.0", "fs-extra": "^3.0.1", "generate-schema": "^2.6.0", "hjson": "^3.2.2", "immer": "^1.1.1", "install": "^0.13.0", "ioredis": "^4.19.2", "js-base64": "^2.3.2", "js-enumify": "^0.1.1", "json-schema-faker": "^0.5.0-rc13", "json-schema-ref-parser": "4.0.0", "json5": "0.5.1", "jsondiffpatch": "0.3.11", "jsoneditor": "^9.7.4", "jsonwebtoken": "7.4.1", "jsrsasign": "^8.0.12", "jszip": "^2.6.1", "jump.js": "^1.0.2", "koa": "2.0.0", "koa-body": "^2.5.0", "koa-bodyparser": "^3.2.0", "koa-multer": "1.0.2", "koa-mysql-session": "0.0.2", "koa-ratelimit": "^5.0.0", "koa-router": "^7.0.1", "koa-send": "3.2.0", "koa-session-minimal": "3.0.3", "koa-static": "3.0.0", "koa-websocket": "4.0.0", "koa2-cors": "^2.0.6", "ldapjs": "^1.0.1", "markdown-it": "8.4.0", "markdown-it-anchor": "4.0.0", "markdown-it-table-of-contents": "0.3.2", "md5": "2.2.1", "mockjs": "1.0.1-beta3", "moment": "^2.19.3", "mongodb": "3.1.8", "mongoose": "5.3.2", "mongoose-auto-increment": "5.0.1", "moox": "^1.0.2", "n": "^4.1.0", "node-schedule": "^1.3.2", "nodemailer": "4.0.1", "os": "0.1.1", "postcss": "^8.3.9", "qs": "^6.7.0", "randomcolor": "^0.6.2", "react-cookies": "^0.1.1", "react-json-view": "^1.21.3", "really-relaxed-json": "^0.2.24", "redis": "^3.0.2", "redlock": "^4.2.0", "relaxed-json": "^1.0.3", "request": "2.81.0", "sha.js": "2.4.9", "sha1": "1.1.1", "swagger-client": "3.5.1", "tslib": "1.8.0", "underscore": "1.8.3", "url": "0.11.0", "xlsx-browserify-shim": "0.0.5", "yapi-plugin-auto-test": "0.0.1", "yapi-plugin-cas": "0.0.1", "yapi-plugin-dingding": "^1.2.4", "yapi-plugin-import-rap": "^0.1.13" }, "devDependencies": { "antd": "3.26.19", "anujs": "^1.2.6", "assets-webpack-plugin": "^3.5.1", "ava": "^0.22.0", "babel": "^6.5.2", "babel-core": "^6.8.0", "babel-eslint": "^7.2.3", "babel-loader": "^6.2.4", "babel-plugin-import": "^1.3.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-object-rest-spread": "^6.8.0", "babel-plugin-transform-runtime": "^6.9.0", "babel-plugin-webpack-alias": "^2.1.2", "babel-preset-es2015": "^6.9.0", "babel-preset-react": "^6.5.0", "babel-preset-stage-3": "^6.24.1", "babel-register": "^6.9.0", "babel-runtime": "^6.9.2", "brace": "^0.10.0", "buffer-shims": "^1.0.0", "compression-webpack-plugin": "^1.0.0", "copy-webpack-plugin": "^4.0.1", "core-decorators": "^0.17.0", "css-loader": "^0.28.4", "eslint": "^3.19.0", "eslint-loader": "^1.9.0", "eslint-plugin-import": "^2.2.0", "eslint-plugin-react": "^7.1.0", "extract-text-webpack-plugin": "2.0.0", "ghooks": "^2.0.0", "happypack": "^4.0.0-beta.5", "json-schema-editor-visual": "^1.1.1", "koa-server-http-proxy": "^0.1.0", "less": "^2.7.2", "less-loader": "^4.0.5", "markdown-it-include": "^1.0.0", "node-sass": "^4.9.0", "nodemon": "^1.11.0", "prop-types": "^15.5.10", "rc-queue-anim": "^1.2.0", "rc-scroll-anim": "^1.0.7", "rc-tween-one": "^1.5.5", "react": "^16.13.1", "react-dnd": "^2.5.1", "react-dnd-html5-backend": "^2.5.1", "react-dom": "^16.14.0", "react-redux": "^7.1.2", "react-router-dom": "^4.3.1", "react-scripts": "1.0.10", "reactabular-dnd": "^8.9.0", "reactabular-table": "^8.9.0", "recharts": "^1.0.0-beta.0", "redux": "^3.7.1", "redux-devtools": "^3.4.0", "redux-devtools-dock-monitor": "^1.1.2", "redux-devtools-log-monitor": "^1.3.0", "redux-promise": "^0.5.3", "rewire": "^2.5.2", "sass-loader": "^7.0.3", "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.18.2", "table-resolver": "^3.2.0", "typescript": "4.1.3", "validate-commit-msg": "^2.14.0", "webpack": "^2.2.0", "webpack-dev-middleware": "^1.12.0", "webpack-node-externals": "^1.6.0", "ydoc-plugin-img-view": "^1.0.1", "ykit": "0.6.2", "ykit-config-antd": "0.1.3", "ykit-config-es6": "^1.1.0" }, "config": { "ghooks": { "commit-msg": "validate-commit-msg" }, "validate-commit-msg": { "types": [ "feat", "fix", "docs", "test", "chore", "refactor", "opti" ], "warnOnFail": false, "maxSubjectLength": 100, "subjectPattern": ".+", "subjectPatternErrorMsg": "请输入message信息!", "helpMessage": "Commit message 格式错误, http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html" } }, "engines": { "node": ">= 7.6.0", "npm": ">= 4.1.2" }, "babel": { "presets": [ [ "es2015", { "loose": true, "modules": "commonjs" } ], "es2017", "stage-0", "react" ], "plugins": [ "transform-runtime", [ "webpack-alias", { "config": "webpack.alias.js" } ] ] }, "ava": { "files": [ "test/**/*.js" ], "require": [ "babel-register" ], "babel": "inherit" } }

bigbigmyworld avatar Jun 10 '22 03:06 bigbigmyworld