Flask+vue+webpack uses nginx+uwsgi deployment problem
为情所困
为情所困 2017-05-16 17:16:01
0
1
1187

Question: The system was developed using flask+vue and now needs to be deployed on VPS. Now deployed on VPS using nginx+uwsgi, the page can now be accessed through the domain name, but because css, js, and the page are all written in vue. Vue is packaged using webpack.

In the configuration of webpack, publicPath = process.env.PUBLIC_PATH || 'http://IP:5001/assets/'

But when accessing, the packaged js and css cannot be loaded, and the page cannot be displayed.

Firebug shows http://IP:5001/assets/*.js abort. Unable to load.

The simple configuration of nginx just transfers port 80 to port 8001.

How to configure webpack or nginx to expose js css

为情所困
为情所困

reply all(1)
巴扎黑

My experience is to use nginx js and css to access your physical path, such as root /static/ /home/xxx/static

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!