Closed strattonbrazil closed 3 years ago
I usually just run Webpack in a separate terminal window, with watch mode on. And then in Maven the watch mode is off.
Thanks. I was considering something like that, but thought it might be handy to have maven do it so I'd be using the same node/npm version. Do you just reference the local installation in the second terminal to do that?
$ ./node/npm run webpack-watch
It depends, I usually just use the global node.js installation for simplicity.
This plugin as been extremely helpful setting up a npm build flow for my java app. One thing that's remained a challenge for me is rerunning specific steps on file changes. I had set up webpack to do this, which worked fine, but I didn't want to do this as part of the normal build process since it would prevent moving on to the next phase/goal.
Here's a snippet with two execution steps--the first is normal use and has been part of the build phase, and the second is what I was trying to do using a random phase:
The problem is this holds up the rest of the build/run process like starting the web server.
I was considering adding a custom phase I could put this in, but was also wondering if there were an easier way to do this. Is there a better way to accomplish this? Is there another workflow for running specific execution steps only some of the time?