Closed vfonic closed 5 years ago
Hi @vfonic. Using uniforms in a non-Meteor project is working out of the box if you use the correct version of the code. We do ship both transpiled (/
) and original (/src
) sources.
Meteor dependencies are required in a try {...} catch (...) {...}
block and indirect (const r = require; r(...)
), so it's just working. Eventually, you'll see a warning about it. And yes, it'll be decoupled in the next major version (it'll be a breaking change). If you really want to silence them, simply map them to something else (e.g. with module resolver).
As I've also worked in such a configuration, I'd rather recommend you to put custom uniforms directly into your project code and treat them like normal components.
I won't be able to debug your project, but I can assure you, that the demo project is working.
Indeed, the demo project works. :)
I just wanted to point out that I haven't seen as a common pattern an npm package to require me to add babel plugins so that I can use it.
As I've also worked in such a configuration, I'd rather recommend you to put custom uniforms directly into your project code and treat them like normal components.
That's a good idea! I'll do that.
And yes, it'll be decoupled in the next major version.
Thanks!
As there's no more discussion here, I'm closing.
I'm having quite some issues with using the package, both outside of meteor and using local version.
Basically, the package has quite some requirements/assumptions about which packages I'm using in my codebase.
This is the only package that requires me to modify my webpack configuration (to add
@babel/plugin-proposal-class-properties
and@babel/plugin-transform-flow-strip-types
).I'm also getting warnings about not having some meteor packages, including
check
method/package. This broke my CI build and I also had to modify the CI configuration to pass the build by not marking warnings are build breaks. I'd say that this is not optimal solution. :)I tried to use the package from the local path, but so far I haven't had any luck.
This is the error I'm getting:
These are the dependencies in my
package.json
:Any suggestions of what I'm missing?
I believe documentation could mention more how to use this package locally and maybe try to detach meteor dependencies completely? (I did check the demo, but I still don't know what I'm missing that's breaking the build)
Thanks!