faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <anamba> after struggling with webpack for the Nth time, tried this. simple, fast and clean! https://www.faucet-pipeline.org/ (i tried brunch a while back, but had some struggles with that as well... it was perhaps a bit too simple)
<FromGitter> <anamba> i haven't tried the fingerprinting yet but i plan to
<FromGitter> <alex-lairan> @Blacksmoke16 it was the `.js` :D ⏎ ⏎ I removed it and I can call with the `.js` on the URL
<FromGitter> <alex-lairan> How can I restrict the use of `.js` ? ⏎ ⏎ now I can call `analytics` `analytics.html`, or `analytics.js` ⏎ ⏎ I just want `.js` to work [https://gitter.im/amberframework/amber?at=5c6675dbecef85660bac0ac1]
<FromGitter> <damianham> @alex-lairan you can set a js response in respond_with, all other types will raise a 406, https://docs.amberframework.org/amber/guides/controllers/respond-with
<FromGitter> <Jens0512> Help! Following the guide on JavaScript WebSocket Clients (https://docs.amberframework.org/amber/guides/websockets/javascript-client), with a `main.js` like this: ```js ⏎ import Amber from 'amber'; ⏎ let socket = new Amber.Socket('/chat'); ⏎ socket.connect().then(() => {}); ⏎ ... [https://gitter.im/amberframework/amber?at=5c66d55badf6cb0b2cc3a2b1]
<FromGitter> <noahlh> @anamba faucet pipeline looks cool - thanks for sharing.
<FromGitter> <noahlh> webpack is still a huge pain to use. they're SO much better since the big doc rewrite a few years ago but I still think the way it's been designed is fundamentally confusing - "loaders" vs "plugins" etc. The idea of a simple in-out pipeline is so much cleaner (it's what Gulp did before we all seemed to have given up on that).
<FromGitter> <noahlh> anyway i made the investment to really "get" webpack so if any questions, i'm happy to help
<FromGitter> <Jens0512> Well then, @noahlh *why* do you think I get that error message?
<FromGitter> <Jens0512> And if webpack is a huge pain, why do we use it in Amber? Are there no better options?
<FromGitter> <Jens0512> Why are there so *extremely many* node deps
<FromGitter> <Jens0512> I mean, *modularity* is great, but the quantities just seem obscure to me
<FromGitter> <Jens0512> Maybe I just need to get used to it...
<FromGitter> <noahlh> yeah javascript/npm is not known for module efficiency - there's always a TON. take that one up with the npm gods ;)
<FromGitter> <noahlh> so that error to me says that the Amber import isn't working -- Amber is coming through as undefined. without looking at the code/library, i can't give an exact reason, but my hunches are that either the lib isn't exporting in an ES6-compatible way, or you need to tweak Babel configurations so the import/export is handled properly
<FromGitter> <noahlh> someone please correct me if I'm wrong here but from a quick read of the source code, it looks like `amber.js` exports Socket directly, so you'd want to do:
<FromGitter> <noahlh> ```import Socket from 'amber' ⏎ let socket = new Socket('/chat');``` [https://gitter.im/amberframework/amber?at=5c674853d1e3093ab529e70d]
<FromGitter> <noahlh> if you use `amber.min` instead, it appears that the import as you had it would work (amber.min exports an Amber object). But the default config doesn't use .min
<FromGitter> <Jens0512> Haha! Spot on @noahlh, thanks a ton!
<FromGitter> <Jens0512> This inconsistency between amber.min.js and amber.js is not a very good idea is it? Or am I ignorant of something now
<FromGitter> <Jens0512> (I might sound negative, but don't get me wrong; I love Amber! Thanks a ton for Amber :D)
<FromGitter> <noahlh> totally agree that inconsistency is no bueno!