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

[Bug]: Build file path error #3019

Closed
bosens-China opened this issue Jul 25, 2024 · 7 comments
Closed

[Bug]: Build file path error #3019

bosens-China opened this issue Jul 25, 2024 · 7 comments
Labels
🐞 bug Something isn't working need reproduction

Comments

@bosens-China
Copy link

Version

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 96.94 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 126.0.6478.183
    Safari: 17.5

Details

我在scss文件引入了一个字体文件,但是输出的路径不对,导致查找不到这个文件。
image
image

这可能跟我设置的配置文件
assetPrefix: './', 有关,但是有没有办法能修复这个问题

Reproduce link

none

Reproduce Steps

none

@bosens-China bosens-China added the 🐞 bug Something isn't working label Jul 25, 2024
@chenjiahan chenjiahan changed the title [Bug]: 构建文件路径错误 [Bug]: Build file path error Jul 25, 2024
@chenjiahan
Copy link
Member

What is your expected output path?

@bosens-China
Copy link
Author

What is your expected output path?

能按照相对的路径的条件来返回吗,就比如在index.css引入了otf文件,但是相对于index.css文件路径,它应该输出
../font/.xxx.otf 文件才对。
当然只是一个建议,因为webpack是支持这项的

@chenjiahan
Copy link
Member

Have you tried outpu.assetPrefix: 'auto'? It is the same as webpack's output.publicPath and can emit relative path.

@bosens-China
Copy link
Author

auto 也不成,老哥有啥其他办法吗

Copy link
Contributor

Hello @bosens-China. Please provide a reproduction repository or online demo. For background, see Why reproductions are required. Thanks ❤️

@chenjiahan
Copy link
Member

Please provide a reproduction for this

Copy link
Contributor

github-actions bot commented Aug 3, 2024

As the issue was labelled with need reproduction, but no response in 5 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions. For background, see Why reproductions are required.

由于该 issue 被标记为 "需要重现",但在 5 天内没有回应,因此该 issue 将被关闭。如果你有任何进一步的问题,请随时发表评论并重新打开该 issue。背景请参考 为什么需要最小重现

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working need reproduction
Projects
None yet
Development

No branches or pull requests

2 participants