ooflorent
Repos
54
Followers
184
Following
28

Events

Created at 2 months ago
Created at 2 months ago
issue comment
Improve support for function calls annotated with "INLINE"

I don't know about this. I discovered this behavior awhile ago. I think it is a limitation of the inlining processor.

Created at 2 months ago
issue comment
Improve support for function calls annotated with "INLINE"

@fabiospampinato You can force the inline by renaming the identifier:

function lazyArrayPush ( observer, property ) {
  return observer[property];
}

// `observer` has been renamed to `observer_`
function addCleanup ( observer_, cleanup ) {
 return lazyArrayPush ( observer_, 'cleanups' );
}

export {addCleanup}

This would output:

function n(n,e){return n["cleanups"]}export{n as addCleanup};
Created at 3 months ago
opened issue
Extending some builtin class produces sub-optimal output

Feature request

When a class extends a builtin but is not used, the class declaration is replaced by the builtin identifier instead of being removed. Interestingly, this behavior depends on the which builtin is extending. Extending Set would result in Set being kept in the output whereas extending Array would remove the class declaration.

Version (complete output of terser -V or specific git commit)

Latest

Complete CLI command or minify() options used

{
  module: true,
  compress: {
    passes: 10,
    pure_getters: true,
  },
  mangle: {
    properties:true
  },
  output: {},
  parse: {},
  rename: {},
}

terser input

class a extends Map {}
class b extends Set {}

terser output or error

Map,Set;

Expected result

Empty output

Created at 3 months ago