| 1234567891011121314151617181920212223242526272829303132 |
- diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts
- index 948c6b4..66ecdd3 100644
- --- a/build/lib/compilation.ts
- +++ b/build/lib/compilation.ts
- @@ -131,27 +131,3 @@ export function compileTask(src: string, out: string, build: boolean, options: {
-
- - // mangle: TypeScript to TypeScript
- - let mangleStream = es.through();
- - if (build && !options.disableMangle) {
- - let ts2tsMangler: Mangler | undefined = new Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data), { mangleExports: true, manglePrivateFields: true });
- - const newContentsByFileName = ts2tsMangler.computeNewFileContents(new Set(['saveState']));
- - mangleStream = es.through(async function write(data: File & { sourceMap?: RawSourceMap }) {
- - type TypeScriptExt = typeof ts & { normalizePath(path: string): string };
- - const tsNormalPath = (ts as TypeScriptExt).normalizePath(data.path);
- - const newContents = (await newContentsByFileName).get(tsNormalPath);
- - if (newContents !== undefined) {
- - data.contents = Buffer.from(newContents.out);
- - data.sourceMap = newContents.sourceMap && JSON.parse(newContents.sourceMap);
- - }
- - this.push(data);
- - }, async function end() {
- - // free resources
- - (await newContentsByFileName).clear();
- -
- - this.push(null);
- - ts2tsMangler = undefined;
- - });
- - }
- -
- return srcPipe
- - .pipe(mangleStream)
- .pipe(generator.stream)
|