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

无法部署看我! #400

Open
LiukerSun opened this issue Jan 10, 2024 · 2 comments
Open

无法部署看我! #400

LiukerSun opened this issue Jan 10, 2024 · 2 comments

Comments

@LiukerSun
Copy link

项目更新了之后导致没法使用官网的文档部署了。
这里整理了一下可以运行的依赖版本

{
  "name": "homepage",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@ant-design/compatible": "^1.0.2",
    "antd": "^4.0.1",
    "enquire-js": "^0.2.1",
    "rc-banner-anim": "^2.2.2",
    "rc-queue-anim": "^1.6.12",
    "rc-scroll-anim": "^2.5.6",
    "rc-tween-one": "^2.3.4",
    "react": "^16.8.3",
    "react-dom": "^16.8.3",
    "react-scripts": "2.1.5",
    "react-sublime-video": "^0.2.5"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-app-rewired eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "babel-plugin-import": "^1.11.0",
    "customize-cra": "^0.2.12",
    "less": "^3.9.0",
    "less-loader": "^4.1.0",
    "react-app-rewired": "^2.1.0"
  }
}

config-overrides.js:

const { override, fixBabelImports, addLessLoader } = require('customize-cra');

module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,
    }),
    addLessLoader({
        javascriptEnabled: true,
    }),
);
@LiukerSun
Copy link
Author

homepage.zip

@NanZehua
Copy link

homepage.zip

你这用那个版本的 node 编译的,我下载了 rpm 包都安装不了。

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

2 participants