Comments (6)
有可能,建议使用高版本的nodejs打包试一下。
from satellite-track.
能告知一下您那边使用的版本吗,我现在本地用的是V18.17.0这个版本的。
from satellite-track.
我本地使用的是 v16.14.0。如果你的开发环境是正常的,看报错应该是打包之后的路径问题。可以检查一下资源引用的路径。
from satellite-track.
昨晚上又试了T.T,把router/index.js里面的history 模式改了createWebHistory 和createWebHashHistory ,都还是有出现这个问题,或者还需要注意修改其他地方的文件吗
nginx里面的配置是这样的
listen 5173;
server_name 10.71.2.100;
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html; # 防止页面刷新404
autoindex on;
}
from satellite-track.
from satellite-track.
如果你的项目没有放在nginx的根目录下,需要在项目中配置公共基础路径,并且要与线上环境保持统一。
from satellite-track.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from satellite-track.