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

使用nginx部署production出现的问题 #13

Open
jayzhou215 opened this issue May 28, 2020 · 0 comments
Open

使用nginx部署production出现的问题 #13

jayzhou215 opened this issue May 28, 2020 · 0 comments

Comments

@jayzhou215
Copy link

jayzhou215 commented May 28, 2020

使用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;
  }
}
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

1 participant