These are chat archives for ractivejs/ractive

24th
Jan 2018
Joseph
@fskreuz
Jan 24 2018 13:52
I know there's still AMD users using Ractive (I just pushed fixes to rvc last night) but moving forward, ignoring the current component format in the discussion for now...
Should we just write and export component files in ES (write <script> in ESM, emit as ESM)? and let tools like Rollup/Webpack handle the output?
One of the arguments I have is that if you're writing in ES, you probably have a build step to support this workflow.
Juan C. Andreu
@andreujuanc
Jan 24 2018 14:36
agree
if using ESM obviously user is doing some sort of transpile
Chris Reeves
@evs-chris
Jan 24 2018 15:39
does anyone know how hard it is to convert into the systemjs module format? apparently the new rollup dynamic import support builds on systemjs for the runtime side
Joseph
@fskreuz
Jan 24 2018 16:50
Isn't systemjs just ES modules sans ES6+ syntax?
iirc, it supports all formats. But was leaning towards ES because native and more tools are gaining support (hence the earlier questions).
Chris Reeves
@evs-chris
Jan 24 2018 16:56
oh, absolutely, but the systemjs runtime send minimal enough from a cursory glance to have a shim with it built in
send -> seems
mobile hates me
I've moved fully to es + build even for integration in non-node systems, but I'd like to keep everything script tag friendly
Juan C. Andreu
@andreujuanc
Jan 24 2018 17:43
even with native browser import support, somehow bundling is something that is gonna be needed.
The thing is , it should be done faster and somehow standardized
Gulp, grunt, webpack, rollem, rollup, jesus ....
ESM + Native bundling... thats what the world needs
When you code in, lets say, dotnet core, you just do dotnet publish and thats it. Everything is done for you. Idk why clientside JS is so disastrous
Joseph
@fskreuz
Jan 24 2018 17:49
I wish it would be just like before, where we write JS that immediately runs on the browser for dev, and post-processing was as simple as bundle + treeshake + minify. This is the whole reason why I still use ractive-load - Stick 2 libs on the page and start writing component files. Then when it comes to deploy, that's the only time you bring in the big guns (gulp, rollup, ractive tools, etc.) which consumes that same code, and emits an optimized version of it.
Juan C. Andreu
@andreujuanc
Jan 24 2018 17:52
ractive-load is amazing.
:beer: for that
Joseph
@fskreuz
Jan 24 2018 17:53
Hopefully the native imports proposal supports hooks (like SystemJS, Rollup) where you can pre-process the module before it evaluates it, giving the same functionality as ractive-load.
Juan C. Andreu
@andreujuanc
Jan 24 2018 17:54
Yeap
for prod i use the webpack loader as well
works really good with webpack aliases when i dont use ractive.load but dynamic page loading
more like, dynamic from bundled page loading..