License files being generated even with extractComments = false
See original GitHub issue- Laravel Mix Version: 6.0.6
Description:
I’m getting app.js.LICENSE.txt and vendor.js.LICENSE.txt files even though I’ve set the terser plugin option extractComments
to false
Steps To Reproduce:
npm run watch
My config:
/* jshint node: true */
const mix = require('laravel-mix')
const path = require('path')
/** Mix Options **/
mix.options({
terser: {
extractComments: false,
}
})
/**
* Frontier Assets
*/
mix
.js('resources/js/app.js', 'public/js')
.vue({ version: 2 })
.postCss('resources/css/app.css', 'public/css')
.copy('resources/img/', 'public/img/')
.extract()
// Add version in production build
if (mix.inProduction()) {
mix.version()
}
/**
* Custom webpack config.
*/
mix.webpackConfig(require('./webpack.config'))
Contents of webpack.config.js:
/**
* The Path module.
*/
const path = require('path');
/**
* Custom Webpack config.
*
* Described here, in the separate file, for the IDE support.
*
* @see https://gist.github.com/nachodd/4e120492a5ddd56360e8cff9595753ae
*/
module.exports = {
resolve: {
alias: {
'@': path.resolve(__dirname, 'resources/js'),
'@css': path.resolve(__dirname, 'resources/css'),
}
},
optimization: {
minimize: true,
}
};
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
License files being generated even with extractComments ...
Laravel Mix Version: 6.0.6 Description: I'm getting app.js. ... License files being generated even with extractComments = false #2738.
Read more >License files being generated even with extractComments ...
License files being generated even with extractComments = false. ... LICENSE.txt files even though I've set the terser plugin option ...
Read more >Webpack - omit creation of LICENSE.txt files - Stack Overflow
Note: extractComments: false will omit the creation of a separate LICENSE file and terserOptions.format.comments: false will also remove the ...
Read more >Stop Mix from generating license file - Laracasts
Mix recently started generating a license file called /js/app.js.LICENSE.txt. ... mix.options({ terser: { extractComments: false, } });.
Read more >TerserWebpackPlugin | webpack
This plugin uses terser to minify/minimize your JavaScript. Getting Started. Webpack v5 comes with the latest terser-webpack-plugin out of the box. If you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should work for what you want to do:
@bcorcoran
try this: