looking at js builds: is there a way to guarantee ...
# javascript
b
looking at js builds: is there a way to guarantee that all files are compiled to the same location for all builds? I need a single entry point js file that's being loaded by another JS framework if present at a certain location
t
Do you mean development and production builds?
b
yes
it seems to compile into lots of different folders
t
It will require cleanup synchronization, like here
b
this may sound stupid but it feels like I'm at a point where it's easier to just write a gradle plugin than to use existing infrastructure
and all I want is to run webpack in dev/production with or without watch mode
t
Why do you need same folder in that case?
b
because I must specify the entrypoint
it's kinda similar to a node lib, you also need to specify your index.js file in the package.json
so the usecase shouldn't be alien
I mean I could dynamically rewrite the location in the json file based on what command I'm executing but that sounds bad
t
You can create 2 distributions in one Gradle run - that's why folders are different
b
maybe something like doLast { // execute esbuild on task folder }
I'd need to skip webpack then I guess
t
Without watch mode I use custom "distribution" task for similar cases