Comments (8)
Is this a cross-origin stylesheet again?
If so, you need to force 'useLinks' when you're doing cross-origin.
Actually, it should use them anyway. Sorry - invalid argument there.
from require-css.
Yeah I'm about to force that to true via config. I was just a little unclear. So we're saying until things are set, useLinks set to true via config will only be cross-domain-safe way until we remove that guard? Also if I do
require.config({
// Where does the config example from docs go?
});
I tried putting it with or without the config
key since I'm already in a config
function. I also tried putting it under map
since I have other plugin configs laying in there.
from require-css.
Ah I just saw your edit? Are you saying that I shouldn't need to force?
from require-css.
Yes exactly - when loading an external stylesheet it is supposed to default to links. It seems it is this check which was failing.
The update should cause this check to work now (hopefully).
Also if you do use configuration, it should look like -
require.config({
config: {
'require-css/css': {
useLinks: true
}
}
});
from require-css.
require.config({
baseUrl: '/assets/js',
paths: {
'styles': '../css',
'templates': '../templates'
},
config: {
'require-css/css': {
useLinks: true
}
},
map: {
'*': {
'css': 'require/css',
'hgn': 'require/hgn'
},
'require/hgn': {
'hogan': 'require/hogan',
'text': 'require/text'
}
}
});
Followed by console.log( module.config().useLinks );
inside css.js
is yielding undefined
from require-css.
You'd need to use require/css: {.. config ..}
in your case.
from require-css.
D'oh
from require-css.
I believe this should be working now. Let me know if you spot anything else!
from require-css.
Related Issues (20)
- explanation requested
- In IE8-9 onload does not fire in the second iframe HOT 1
- [Help!]There is a problem that load the css in iframe
- Is it possible to set media type when I load css via require?
- Require CSS in the path HOT 4
- Not working relative path's with baseUrl HOT 2
- How to skip css! references in r.js builds? HOT 1
- Removing CSS files (by reading the `removeCombined` property) HOT 3
- R.js build fails with external resources defined in the "paths" config property HOT 8
- req.toUrl is undefined HOT 2
- IE9: ieCurCallback null, Object expected HOT 1
- Error load timeout for css modules HOT 2
- In css-builder.js path.dirname(config.out) got an error HOT 2
- having trouble specifying path of css to load HOT 1
- R.js - Path must be a string HOT 4
- "Script-inlined CSS Benefits" - additional info
- how to work with commonjs module HOT 1
- When loading a cdn style sheet fails,How to load a local style sheet
- require-css load css file folder name conflict with plugin name
- Loading a css file that doesn't end with ".css"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from require-css.