Closed
Description
What / Why
I have some npm scripts. Some of them use env variables. For example (just example):
"scripts": {
"start": "webpack --watch --env.noSourceMaps",
},
So, for now, when I call npm start
env.noSourceMaps = true
But, how can I unset that variable when run npm start?
If I run npm run -- --env.noSourceMaps=false
I got env.noSourceMaps = [true, 'false']
If I run npm run -- --env.noSourceMaps
I got env.noSourceMaps = [true, true]
If I run npm run -- --env.noSourceMaps=
I got env.noSourceMaps = [true, '']
But I want env.noSourceMaps = false or undefined
And I do not want to reverse logic (I mean, i don't want to use it as "start": "webpack --watch" and call it as npm start
or npm start -- --env.noSouceMaps
or "start": "webpack --watch", "start:noMaps": "webpack --watch --env.noSourceMaps"
)
Metadata
Metadata
Assignees
Labels
No labels