mobxSpa icon indicating copy to clipboard operation
mobxSpa copied to clipboard

使用nginx部署production出现的问题

Open jayzhou215 opened this issue 4 years ago • 0 comments

使用nginx指向 npm run build的dist路径后出现下面这个错,能帮看下吗

vendors.78c603f1.dll.js:17 ReferenceError: G is not defined
    at render (main.8609896d.chunk.js:1)
    at t.render (react.4b575fcb.dll.js:30)
    at Ua (vendors.78c603f1.dll.js:17)
    at Da (vendors.78c603f1.dll.js:17)
    at yu (vendors.78c603f1.dll.js:17)
    at cl (vendors.78c603f1.dll.js:17)
    at ul (vendors.78c603f1.dll.js:17)
    at Zu (vendors.78c603f1.dll.js:17)
    at Ku (vendors.78c603f1.dll.js:17)
    at Ll (vendors.78c603f1.dll.js:17)

nginx config

server {
  listen 5001;
  root  /path/to/mobxSpa/dist;
  index index.html index.htm;

  location / {
     try_files $uri /index.html =404;
  }
}

jayzhou215 avatar May 28 '20 11:05 jayzhou215