Webpack: Docs for --report when working with yarn?

Created on 6 Sep 2017  路  2Comments  路  Source: vuejs-templates/webpack

I was noticing that yarn build -- report or yarn build -- --report doesn't work. I'm wondering if there is a way to make that work with yarn. I've searched around but have not found much documentation on this argument process.env feature of NPM either.

Most helpful comment

Yeah, sadly it seems like yarn doesn't support environment from cli at this moment

However you can do something like this

  1. Add this to you package.json scripts
"scripts": {
    "build:report": "cross-env npm_config_report=true node build/build.js"
  1. Just run the script
yarn build:report

All 2 comments

Yeah, sadly it seems like yarn doesn't support environment from cli at this moment

However you can do something like this

  1. Add this to you package.json scripts
"scripts": {
    "build:report": "cross-env npm_config_report=true node build/build.js"
  1. Just run the script
yarn build:report

If you meet cross-env command not found, just run yarn add -D cross-env.

Was this page helpful?
0 / 5 - 0 ratings