Pre-built CSSPropertyOperations
Closed this issue · 5 comments
Is there a reason for pre-building 'CSSPropertyOperations' instead of requiring it from React or copy/pasting the original files?
Webpack complains about its format:
WARNING in ./~/glamor/lib/CSSPropertyOperations.js
Critical dependencies:
26:78-86 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/glamor/lib/CSSPropertyOperations.js 26:78-86
Thanks!
Yeah, it's extracted from react; else I'd have to include react as a dependency. My options are
- make this lib for react only
- rewrite that bit myself
The former isn't likely, I want this lib to be framework independent. The latter, well, too lazy to do it now :)
The webpack warning is just a red herring, is it a deal breaker for you? I'll try to figure out how to avoid the warning, though I'm frankly not sure where to start.
Thanks, I will try todo a PR to fix that.
best 'fix' I've found so far is for the consumer to put this in their webpack config
module: {
noParse: /node_modules\/glamor\/lib\/CSSPropertyOperations.js/,
loaders: [{
...
annoying that the consumer has to do this, but that's webpack's fault, can't do much :|
closing this issue, lemme know if you figure out an alternate solution. cheers!
An update - I've made it so it pulls react's local version of the file (and ~halving the lib size in the process). I'm assuming most people would use this with react anyway, else the umd version is available, as well as the prebuilt file. Cheers.