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
发现在加了text!前缀后,后面跟的就只能是绝对路径,而不能是一个alias了,或者是我的使用问题?
例如: seajs.config({ alias: { 'view::search': 'js/views/search.js' } });
之后require('text!view::serach')就会转化为base/view::search,而没有替换alias。
后来查看了下源代码,发现是在id后面加了#后缀,以标识插件。 那么,hack一下, seajs.config({ alias: { 'view::search#': 'js/views/search.js' } });
这样再require('text!view::serach')就能正常转换了。
我希望可以实现类似
seajs.config({ alias: { 'view::search': text!'js/views/search.js' } }); 这样的效果,每次只需要require('view::serach')即可,但是代码里是检测的id,改起来不怎么容易。 不知有什么好的解决办法么?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
发现在加了text!前缀后,后面跟的就只能是绝对路径,而不能是一个alias了,或者是我的使用问题?
例如:
seajs.config({
alias: {
'view::search': 'js/views/search.js'
}
});
之后require('text!view::serach')就会转化为base/view::search,而没有替换alias。
后来查看了下源代码,发现是在id后面加了#后缀,以标识插件。
那么,hack一下,
seajs.config({
alias: {
'view::search#': 'js/views/search.js'
}
});
这样再require('text!view::serach')就能正常转换了。
我希望可以实现类似
seajs.config({
alias: {
'view::search': text!'js/views/search.js'
}
});
这样的效果,每次只需要require('view::serach')即可,但是代码里是检测的id,改起来不怎么容易。
不知有什么好的解决办法么?
The text was updated successfully, but these errors were encountered: