Quick Q, can a Kotlin plugin supply a webpack frag...
# javascript
a
Quick Q, can a Kotlin plugin supply a webpack fragment for an executable module and how might that work? Context: I'm writing a plugin that bridges between compose multiplatform and storybook.js, and I got it working in probably the most hacky, vibe coded way you possibly could think of, but now I want to integrate it tightly into gradle, since I am currently spinning up my own webpack task.
a
Wow, it's an interesting use case. Could you share a bit more? • What do you mean by "webpack fragment"? Is it a part of config, or it's a chunk of resulting JS? • Why do you need your own webpack task? Maybe we can find together how to extend the existing one
a
By webpack fragment, I mean the ability we have to put a js file inside webpack.config.d and manipulate the resulting configuration file that way.
And I definitely want to move away from the implementation where there is separate config. Usually Storybook JS handles configuring webpack for you, but I think it's possible to configure your own instance using one of their packages.
Though I'm getting mixed information on whether async/await is supported in those fragments.
t
Probably it will be easier to start with Vite 😉
a
Yeah, I've considered this, but I'm honestly more familiar with webpack from at least 4 years ago, and it seems to have remained the same 😂