question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello,

I’m looking for minify tool which can obfuscate whole my project. I need to rename all variables, methods, properties and classes names (including “export” ones).

I’m trying to use ts-minify but currently have these problem:

  1. “Symbol information could not be extracted” I have this error near:
export function x(let el: Element) {
el.className = "xx"; // here
}

do I need to load ES5 library for ts-minify?

  1. If I set fastFail to false, error (1) goes out (!) but I see another error: “Error: ts-minify does not support accepting both internal and external types at a use site Symbol name: Dialog”

I have class Dialog:

export class Dialog {
..
}

and use it in this way (in other files):

import {Dialog} from "dir/dialog"

What am I doing wrong? TSC sees no problems in such code.

  1. Exports are not being renamed… I pass all linked to each other files as one array to renameProgram() method, so I expect ts-minify knows anything about classes and can rename them in all the files. I want to rename anything except one API class I specify (and its public methods). All other classes are internal, tough they have “export” keyword. How to pass API class name to ts-minify and let ts-minify to rename everything except it?

I will be very appreciated for any help 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mprobstcommented, Dec 23, 2016

@dmiko the TS API is pretty complete, with enough effort you can probably make this work. I’m not sure though if that’s the simplest solution, I’d rather look into tsickle.

0reactions
aiboostcommented, Dec 23, 2016

@mprobst , thank you for answer. How do you think is it even possible to implement what I need (item 3) with TypeScript API? I’m thinking about to start from ts-minify and upgrade it for my needs or to write my own tool.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GulpUglifyError:Unable to minify JavaScript - Stack Overflow
The main error is generated when you're using ES6 format. Use the gulp-uglify-es module instead of 'gulp-uglify' to overcome this error.
Read more >
GulpUglifyError: unable to minify JavaScript #349 - GitHub
Running gulp-uglify v3.0.1 and passing any option whatsoever causes it to fail. It works when no options are passed.
Read more >
GulpUglifyError: unable to minify JavaScript - Kontext
One workaround is to replace Ugnify with gulp-terser. Follow these steps to do that: Install gulp-terser by updating package.json or use npm ...
Read more >
GulpUglifyError:Unable to minify JavaScript - YouTube
JavaScript : GulpUglifyError: Unable to minify JavaScript [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >
Resolving "Failed to minify the bundle" Errors - CircleCI Support
TerserWebpackPlugin. The following error message is usually related to running out of memory during a job: Failed to minify the bundle.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found