A
A
Alex2018-08-03 18:09:41
Node.js
Alex, 2018-08-03 18:09:41

How to run dev and build together?

Good afternoon, there was a need for automatic production generation during development. How to run a command like "super": "dev && build" ?

"scripts": {
    "dev": "webpack-dev-server --mode development --open",
    "build": "webpack --mode production"
  },

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Egorov, 2018-08-03
@astrodeep

On Windows like this:
(npm run dev) && (npm run build)

A
Anton fon Faust, 2018-08-03
@bubandos

If in linux: npm dev && npm build
But, in general, logically, you need to run the build first, and then the dev.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question