Open testinggithub1222 opened 5 years ago
In case of args = ['run', 'build']
you need to have corresponding build
in scripts
section of package.json
. No need to put anything except this in gradle configuration
@vitalyster Please elaborate in detail i am not sure what do you mean by this.
@testinggithub1222
Here is a part of your gradle configuration:
// Runs "npm run build" to build the app.
task nodeBuild(type: NpmTask) {
args = ['run', 'build', 'webpack', 'build']
}
just remove unnecessary args and make it looks like that:
args = ['run', 'build']
then check your package.json
for the scripts
section, it should have the following:
"scripts": {
"build": "webpack build"
}
So gradle node plugin will run npm build
task and it will call webpack build
script
@vitalyster sorry for late reply. I will check it out and report as soon as i got time and test it.
I am trying to use this plugin to work with npm as well as webpack in other to build reactjs web application but I am not sure how can i build webpack using this plugin. What I can find is build npm only.
I have found some same question on stackoverflow but i could not find any solution. Please help me find out.