We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
blade中require资源写绝对路径会被格式化为相对路径,layout中的require在继承了之后会出现静态资源加载不上的问题,最明显的是modjs在浏览器中表现为js/mod.js无法找到,比如我的路径是http://xxx.com/a/b 那么modjs的路径就是http://xxx.com/a/js/mod.js
The text was updated successfully, but these errors were encountered:
是哪一步正则替换把绝对路径的/开头去掉了
Sorry, something went wrong.
好吧自己解决了 // static 下面本来就是静态资源,去掉多出来的一层目录。 fis.match('/static/(**)', { release: '/public/$1', url: '/$1' });
url $1前面加上/即可 不知道这样做是否符合规范
我本地调试的时候也这样搞,因为fis都是转成绝对路径。有一个相对路径的插件fisx-hook-relative。不过正式上线的时候,静态资源都放cdn,直接使用domain就可以了
No branches or pull requests
blade中require资源写绝对路径会被格式化为相对路径,layout中的require在继承了之后会出现静态资源加载不上的问题,最明显的是modjs在浏览器中表现为js/mod.js无法找到,比如我的路径是http://xxx.com/a/b
那么modjs的路径就是http://xxx.com/a/js/mod.js
The text was updated successfully, but these errors were encountered: