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

打包部署服务器一片空白? #6

Closed
lxy910812 opened this issue Jun 9, 2020 · 2 comments
Closed

打包部署服务器一片空白? #6

lxy910812 opened this issue Jun 9, 2020 · 2 comments

Comments

@lxy910812
Copy link

什么情况

@NLRX-WJC
Copy link
Owner

NLRX-WJC commented Jun 9, 2020

config-overrides.js 文件里把 publicPath 改成你的哦,或者你将以下代码注释:

const addCustomize = () => (config) => {
  //if (config.output.publicPath) {
  //  config.output.publicPath =
  //    process.env.NODE_ENV === "production"
  //      ? "/react-antd-admin-template/"
  //      : "/";
  //}
  if (config.resolve) {
    config.resolve.extensions.push(".jsx");
  }
  return config;
};

还有在 .env.production 文件中 将 PUBLIC_URL 改为你的,或者将这行代码直接删除

@lxy910812
Copy link
Author

config-overrides.js文件里把publicPath改成你的哦,或者你将以下代码注释:

const  addCustomize  =  () =>  (config  =>  { 
  //如果(config.output.publicPath){ 
  // config.output.publicPath = 
  // process.env.NODE_ENV ===“ production” 
  //吗?“ / react-antd-admin-template /” 
  //:“ /”; 
  //} 
  如果 (配置。解决) { 
    配置。解决。扩展名。push (“ .jsx” ; 
  } 
  return  config ; 
} ;

还有在.env.production文件PUBLIC_URL中将改变你的,或者将这行代码直接删除

可以了,谢谢作者,你这个就比较简单,像AntdPro那个就太多东西了,太复杂了,看不懂,25k,star那个,完全看不懂

@NLRX-WJC NLRX-WJC closed this as completed Jun 9, 2020
@NLRX-WJC NLRX-WJC pinned this issue Jun 24, 2020
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