Unable to minify
See original GitHub issueHello,
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:
- “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?
- 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.
- 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:
- Created 7 years ago
- Comments:5
Top 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 >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
@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
.@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.