You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
请问打包如何移除 typescript.js .
项目没有使用 ts .
主要也是打包出来的体积太大了
非常感谢
附上 package.json
`
{
"name": "ts-health",
"version": "1.0.0",
"description": "1.0.0",
"private": true,
"scripts": {
"start": "cross-env APP_TYPE=site UMI_UI=none PORT=8080 umi dev",
"start:no-mock": "cross-env MOCK=none umi dev",
"build": "umi build",
"test": "umi test",
"test:component": "umi test ./src/components",
"test:all": "node ./tests/run-tests.js",
"analyze": "cross-env ANALYZE=1 umi build",
"lint": "eslint --ext .js src mock tests && npm run lint:style && npm run lint:prettier",
"lint:style": "stylelint "src//*.less" --syntax less",
"lint:fix": "eslint --fix --ext .js src mock tests && npm run lint:style",
"lint:prettier": "check-prettier lint",
"lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js",
"tslint": "npm run tslint:fix",
"tslint:fix": "tslint --fix 'src//.ts'",
"precommit": "lint-staged",
"prettier": "node ./scripts/prettier.js"
},
"dependencies": {
"@antv/data-set": "^0.11.7",
"@date-io/date-fns": "1.3.6",
"@material-ui/core": "^4.9.4",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.45",
"@material-ui/pickers": "^3.2.3",
"@material-ui/styles": "^4.9.0",
"@umijs/hooks": "^1.9.0",
"antd-mobile": "^2.2.12",
"better-scroll": "^1.15.2",
"bizcharts": "^3.5.8",
"classnames": "^2.2.6",
"clsx": "^1.1.1",
"date-fns": "^2.0.0-beta.2",
"dva": "^2.4.1",
"enzyme": "^3.8.0",
"hash.js": "^1.1.7",
"html-to-image": "^1.3.20",
"html2canvas": "^1.0.0-rc.7",
"import-cdn-js": "^0.0.2",
"install": "^0.13.0",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"node-fetch": "^2.6.1",
"notistack": "^0.9.9",
"npm": "^6.14.4",
"nprogress": "^0.2.0",
"nzh": "^1.0.4",
"parsec-ls": "^0.0.1",
"path-to-regexp": "^3.0.0",
"prop-types": "^15.7.2",
"qrcode.react": "^1.0.1",
"qs": "^6.6.0",
"rc-cascader": "^1.0.1",
"rc-form": "^2.4.11",
"react": "^16.8.6",
"react-addons-css-transition-group": "^15.6.2",
"react-avatar-editor": "^11.1.0",
"react-circle": "^1.1.1",
"react-compound-timer": "^1.2.0",
"react-dom": "^16.8.4",
"react-fastclick": "^3.0.2",
"react-jsx-parser": "^1.29.0",
"react-qrcode-scan": "^1.1.7",
"react-router-dom": "^4.3.1",
"react-to-print": "^2.12.6",
"recorder-core": "^1.1.21021500",
"seal-generator": "^1.0.4",
"tslint": "^5.16.0",
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^4.0.0",
"umi": "^2.6.16",
"umi-plugin-react": "^1.7.5",
"umi-request": "^1.0.8",
"weixin-js-sdk": "^1.4.0-test"
},
"optionalDependencies": {
"puppeteer": "^1.11.0"
},
"devDependencies": {
"@babel/polyfill": "^7.4.4",
"@types/lodash": "^4.14.123",
"@types/prop-types": "^15.7.1",
"@types/react": "^16.8.14",
"@types/react-dom": "^16.8.4",
"@types/react-router-dom": "^4.3.2",
"babel-eslint": "^10.0.1",
"check-prettier": "^1.0.1",
"cross-env": "^5.2.0",
"cross-port-killer": "^1.0.1",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^4.2.0",
"eslint-config-umi": "^1.4.2",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-compat": "^3.1.1",
"eslint-plugin-flowtype": "^3.6.1",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-react": "^7.12.3",
"husky": "^2.1.0",
"jest-puppeteer": "^4.1.1",
"lint-staged": "^8.1.5",
"mockjs": "^1.0.1-beta3",
"prettier": "^1.17.0",
"stylelint": "^10.0.1",
"stylelint-config-prettier": "^5.1.0",
"stylelint-config-standard": "^18.2.0",
"uglifyjs-webpack-plugin": "^2.1.1"
},
"lint-staged": {
"/*.{js,ts,tsx,json,jsx,less}": [
"node ./scripts/lint-prettier.js",
"git add"
],
"/.{js,jsx,tsx}": "npm run lint-staged:js",
"**/.less": "stylelint --syntax less"
},
"engines": {
"node": ">=8.0.0"
},
"checkFiles": [
"src//.js",
"src//.ts",
"src//*.less",
"config//.js",
"scripts/**/*.js"
],
"husky": {
"hooks": {
"pre-commit": "npm run lint-staged"
}
}
}
`
Beta Was this translation helpful? Give feedback.
All reactions