main.js:
require.config({
paths: {
bootstrapCss: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min'
},
map: {
'*': {
'css': '../../css'
}
}
});
require(['css!bootstrapCss'], function() {});
build.js:
({
name: 'main',
out: 'main-optimized.js',
mainConfigFile: 'main.js'
})
P:\require-css\test\2>node ../../node_modules/requirejs/bin/r.js -o build.js
Tracing dependencies for: main
Error: ENOENT: no such file or directory, open 'P:\require-css\test\2\https:\maxcdn.bootstrapcdn.com\bootstrap\3.3.6\css\bootstrap.min.css'
In module tree:
main
../../css
This happens because css-builder.js checks if the module name is an absolute URL but not if the final file URL is.
I'll make a PR to fix this shortly.