brunch / terser-brunch

A javascript minifier for brunch files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copyright notice is always stripped

meleyal opened this issue · comments

I tried the following, but my copyright notice is always stripped in the minified app.js.

In application.coffee I tried adding ! and @license to the comment:

###!
@license app.js
Copyright 2014 blah...
###

In brunch-config.coffee I tried the following options:

exports.config:
  plugins:
    uglify:
      comments: 'all'
      preamble: '# hello'

@meleyal did you solve the problem?
@paulmillr can you help please?

use as following:

plugins:
    uglify:
       output:
           comments: 'all'

you can also use a regexp for the comments value ( for example: comments: /@license|@preserve|^!/ ) in order to keep only the comments that contain specific strings