node.js - webpack官方的例子(webpack --env=dev),env怎么获取不到
PHPz
PHPz 2017-04-17 16:29:01
0
2
536
PHPz
PHPz

学习是最好的投资!

reply all(2)
左手右手慢动作

Use NODE_ENV as input parameter and process.env.NODE_ENV as parameter to obtain

巴扎黑

The final result may be that it is not possible to write it according to the official method in the windows environment (? Not sure). The solution is to use cross-env to configure NODE_ENV

npm install cross-env --save-dev

scripts are as follows:

"build:dev": "cross-env NODE_ENV=dev webpack --progress --profile --colors"
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!