Commit Graph

11 Commits

Author SHA1 Message Date
Tobias Koppers 4a541303c9 Upgrade jest
increase timeout
fix hanging
avoid inspector in CI
setup jest caching
2018-05-24 12:52:48 +02:00
Bazyli Brzóska 36e8e30875 run prettier on existing code 2018-02-25 11:46:17 +01:00
Bazyli Brzóska a6c2aca36f migrate should to expect, part 2 (manual) 2018-01-26 23:59:38 +01:00
Tobias Koppers 2148f556a4 Enable minimizing in production mode 2017-12-14 00:06:56 +01:00
Michael Ciniawsky 7b9eb0cff9 test(configCases/uglifyjs-plugin): update to new options interface (`options.uglifyOptions`) 2017-11-23 22:08:48 +01:00
Tobias Koppers 8d5a8da16d fix uglify test cases 2017-05-21 21:26:54 +02:00
bwain 04f2622417 require a newer version of uglify that fixes a bug with regexp 2017-05-19 17:15:54 -05:00
Stephen Hurwitz 87702a29ad Updates UglifyJs to 2.8.x to accept additional compress options
Bumps the minimum version of UglifyJs and substitutes `.compress()` for
`.transform()` as recommended. In addition to a new test covering
`compress` options this commit also contains updates to make existing
tests pass with the update.
2017-03-04 18:31:39 -08:00
Sebastian Schweizer 71933e979e UglifyJsPlugin: extract comments to separate file
License comments use up a lot of space, especially when using many small
libraries with large license blocks. With this addition, you can extract
all license comments to a separate file and remove them from the bundle
files. A small banner points to the file containing all license
information such that the user can find it if needed.

We add a new option extractComments to the UglifyJsPlugin.
It can be omitted, then the behavior does not change, or it can be:
- true: All comments that normally would be preserved by the comments
    option will be moved to a separate file. If the original file is
    named foo.js, then the comments will be stored to foo.js.LICENSE
- regular expression (given as RegExp or string) or a function
  (astNode, comment) -> boolean: All comments that match the given
    expression (resp. are evaluated to true by the function) will be
    extracted to the separate file. The comments option specifies
    whether the comment will be preserved, i.e. it is possible to
    preserve some comments (e.g. annotations) while extracting others or
    even preserving comments that have been extracted.
- an object consisting of the following keys, all optional:
  - condition: regular expression or function (see previous point)
  - file: The file where the extracted comments will be stored. Can be
      either a string (filename) or function (string) -> string which
      will be given the original filename. Default is to append the
      suffix .LICENSE to the original filename.
  - banner: The banner text that points to the extracted file and will
      be added on top of the original file. will be added to the
      original file. Can be false (no banner), a string, or a function
      (string) -> string that will be called with the filename where
      extracted comments have been stored. Will be wrapped into comment.
      Default: /*! For license information please see foo.js.LICENSE */
2017-02-10 11:59:56 +01:00
James Hartig 0676304822 Pass mangle options to ast.figure_out_scope in uglify 2016-12-16 16:19:06 -05:00
Alberto Leal 4024689e63 Stronger check and override of comments in UglifyJsPlugin options
Fixes https://github.com/webpack/webpack/issues/324
2015-07-26 21:26:27 -04:00