Hacker News new | ask | show | jobs
by s986s 3977 days ago
Perhaps your research didn't lead you to an answer, however I feel like the bower/browserify isn't that big a bridge to cross. A tool like literalify[1] will allow you to 'require' globals. If you wish to require bower components, browserify-ing them isn't going to work quite well simply because normal javascript adds globals while commonjs has you explicitly get what you desire. As for CSS, there are ways to [2] inject it on the fly. Though at that point your making your bundle much larger than it needs to be.

[1] https://github.com/pluma/literalify [2] https://github.com/substack/insert-css/blob/master/index.js

1 comments

Maybe given a few more hours I'd have gotten it to work correctly, but who wants to spend hours fighting bad tools, especially when just trying to evaluate them?
I agree with that, why fight tools when they are meant to make the job easier