Reputation: 173
I've got a webapp with asp.net core 2.0 and reactjs. Locally I execute:
webpack --config webpack.config.vendor.js
webpack
And it creates the dist folder and everything goes right. I've put this two lines on the post deploy script and also, locally goes right.
Now I'm trying to use continuous integration with vsts configuring a HostVS2017 and it always fails (with Host Linux fails too).
It doesn't find the 'webpack' module even though I previously in the porcess pipeline I installed globally. With a npm step with: install webpack -g.
Any one have any idea about it? Or any interesting post to follow?
Thank you so much.
Upvotes: 1
Views: 288
Reputation: 3671
I would suggest to wrap your command in a script inside your package.json, like this:
"scripts": {
"build": "webpack --config webpack.config.vendor.js",
}
and then in VSTS add an NPM step for npm run build
.
Of course, make sure webpack is a dependency in your package.json, and that you run npm install
in VSTS before this.
Upvotes: 1