Laravel-mix: Running npm production keeps creating <type>.LICENSE files?

Created on 4 Jan 2020  路  2Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 5.0.1 (npm list --depth=0)
  • Node Version: (node -v): v13.5.0
  • NPM Version (npm -v):6.13.4
  • OS: Arch Linux

Description:

Steps To Reproduce:

  1. Run npm run dev, no .LICENSE files
  2. Run npm run prod:
/js/app.js    207 KiB       0  [emitted]         /js/app
 /js/app.js.LICENSE  120 bytes          [emitted]         
/js/app.js.br   46.6 KiB          [emitted]         
/js/manifest.js   1.46 KiB       1  [emitted]         /js/manifest
/js/manifest.js.br  645 bytes          [emitted]         
/js/vendor.js   1.22 MiB       2  [emitted]  [big]  /js/vendor
/js/vendor.js.LICENSE  690 bytes          [emitted]         
/js/vendor.js.br    237 KiB          [emitted]

Is this something new? It doesn't happen on a clean Laravel install. I don't mind including LICENSE files, but they also contain version numbers, that may not be a suitable for production?

Thanks.

Most helpful comment

The terser-webpack-plugin is creating these files. To disable it you need to customize the mix.options in your webpack.mix.js like this:

mix.options({
  terser: {
    extractComments: false,
  }
})

All 2 comments

The terser-webpack-plugin is creating these files. To disable it you need to customize the mix.options in your webpack.mix.js like this:

mix.options({
  terser: {
    extractComments: false,
  }
})

@iamjoshkendall Thanks! That indeed stops creating the *.LICENSE files. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefensuhat picture stefensuhat  路  3Comments

dtheb picture dtheb  路  3Comments

wendt88 picture wendt88  路  3Comments

mementoneli picture mementoneli  路  3Comments

Bomavi picture Bomavi  路  3Comments