so.. what do you use to deploy your react app? wha...
# react
n
so.. what do you use to deploy your react app? whats the task to bundle the js, html and everything so i can upload it or package it into my ktor server jar ? or is this something i need to learn webpack configuration for ?
👍 1
b
There's a webpackBundle task that produces a js bundle and all babel loaded files (e.g css, images), you'll need to write a custom task to include your html.
n
do you have any examples for this.. also how is that task called? i assume thats
browserWebpack
? i do not see
webpackBundle
task when using the new
kotlin.js
or
multiplatform
plugins
b
Yes, browserWebpack. Then you can have a custom copy task that takes the output of
browserBundle
and
jsProcessResources
and copies them into a single dir or zip
Keep in mind, though that new js plugin does not support minification or tree shaking, so the bundle is quite large.
n
Keep in mind, though that new js plugin does not support minification or tree shaking, so the bundle is quite large.
that should get fixed with kotlin 1.4 and later though, right ?
b
We all hope so!
Also last time i used new plugin it had a lot of issues when used along dce plugin
n
when i try to use dce currently it just all blows up
also according to the size of my dependencies i have 8 Mb, big already.. how the fuck does webpack make a 32Mb .js file out of that ?