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
问题:在使用loader的情况下,对css和js添加domain,输入地址有问题,麻烦告诉解决方案,谢谢;
var loader = fis.plugin('loader', { allInOne: { js: function (file) { if (file.isCdn === true) { return '/' + fis.get('name') + '/' + file.filename + 'aio.js'; } return '/' + fis.get('name') + '/unrelease' + file.filename + '_aio.js'; }, css: function (file) { if (file.isCdn === true) { return '/' + fis.get('name') + '/' + file.filename + 'aio.css'; } return '/' + fis.get('name') + '/unrelease' + file.filename + '_aio.css'; }, includeAsyncs: true, useTrack: false }, resourceType: 'amd' });
fis.media('deploy').match('**.js', { optimizer: fis.plugin('uglify-js', { compress: { drop_console: true, drop_debugger: true, dead_code: true } }), domain : '//sec.resource.xiaomi.net/apm/hd' });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题:在使用loader的情况下,对css和js添加domain,输入地址有问题,麻烦告诉解决方案,谢谢;
loader配置:
var loader = fis.plugin('loader', {
allInOne: {
js: function (file) {
if (file.isCdn === true) {
return '/' + fis.get('name') + '/' + file.filename + 'aio.js';
}
return '/' + fis.get('name') + '/unrelease' + file.filename + '_aio.js';
},
css: function (file) {
if (file.isCdn === true) {
return '/' + fis.get('name') + '/' + file.filename + 'aio.css';
}
return '/' + fis.get('name') + '/unrelease' + file.filename + '_aio.css';
},
includeAsyncs: true,
useTrack: false
},
resourceType: 'amd'
});
domain配置:
fis.media('deploy').match('**.js', {
optimizer: fis.plugin('uglify-js', {
compress: {
drop_console: true,
drop_debugger: true,
dead_code: true
}
}),
domain : '//sec.resource.xiaomi.net/apm/hd'
});
输出:
<script type="text/javascript" src="../sec.resource.xiaomi.net/apm/hd/apm-h5-cdn/single-app_aio_757310a.js"></script>The text was updated successfully, but these errors were encountered: