-
Notifications
You must be signed in to change notification settings - Fork 39
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
outDir不合理,导致无法找到cesium.js文件。 #56
Comments
遇到了同样问题 |
找到解决办法了,固定插件版本:1.2.22,新版本引入了cesiumBaseUrl 导致的 |
我看了一下 1.2.23 默认 cesiumBaseUrl 也是和1.2.22一样的呀,为什么会出问题呢?
|
我就是在1.2.22版本出现的这个问题,无法解决。 |
我通过修改源码解决了 |
是哪里的问题呢 |
我排查了一下,问题出在 outDir 拼接时没有考虑 vite 配置中可能带来绝对路径问题,将 path.join 替换成 path.resolve 即可 |
具体是哪里呢 |
让cesium的输出路径回溯一层就可以了: |
我试过这样,在我的项目中,会导致index.html中引用cesium.js的路径错误 |
我是 把 |
####vite配置:
错误输出路径
|-- dist
|-- favicon.ico
|-- index.html
|-- jquery.min.js
|-- nginx.conf
|-- analysis
|-- |-- cesium
|-- |--|-- Cesium.js
预期输出路径
|-- dist
|-- favicon.ico
|-- index.html
|-- jquery.min.js
|-- nginx.conf
|-- cesium
|--|-- Cesium.js
The text was updated successfully, but these errors were encountered: