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.

Remove separate TypeScript compilation.

See original GitHub issue

Current situation Currently, most of the .ts files that we have are compiled through Webpack, only a few remaining files and folders are compiled separately with TypeScript. The files and folders are listed in tsconfig.json. These last remaining files and folders are also the reason why we need to have two separate ts configs (tsconfig-for-compile-check.json).

Expected solution Remove remainig files and folders from tsconfig.ts:

  • karma-globals.ts
    • can be removed after last GLOBAL is removed from frontend tests

After all the files and folders are removed, all the separate TypeScript compilations should be removed and also all references to local_compiled_js folder that was generated by that compilation should be removed.

The last step should be to replace tsconfig.json with tsconfig-for-compile-check.json.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinlee12commented, Sep 27, 2019

It’s fine to do the second one, since the first option isn’t great. However, if @Jamesjay4199 has other suggestions, I’m all ears for that one.

1reaction
vojtechjelinekcommented, Sep 26, 2019

@Jamesjay4199 Do you have any suggestion regarding the last global in FE tests?

typings folder should be obvious from the issue description. extensions/ckeditor_plugins contains the pre plugin which is loaded in ck-editor-4-rte.directive.ts but since it is loaded directly by CKEditor it needs to be some standalone JS file. Two solutions are proposed both are creating a bit of exception in our codebase:

  • The first is to add this file as an entry point into webpack.common.config.ts, that would mean it would be compiled from TypeScript to JavaScript by webpack and provided into the webpack_bundles folder, but I now realize that this would also mean that we would need to handle prod mode when the filename would also contain hash which could be quite complicated.
  • The second is to change the file into JavaScript (this might mean just to change the .ts to .js but also maybe some change in the file content) and have it as an exception. @kevinlee12 would this be okay from your POW?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript - Removing some lines of code from production
I'm using Typescript as my compiler (no webpack or rollup), and I'm creating an ESM bundle with it. Do I need another tool...
Read more >
Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >
removeComments compiler option seems to be ignored when ...
Specifying the argument ($ tsc --removeComments) or option in (tsconfig.json) for removing comments is not honoured.
Read more >
Understanding TypeScript's “Compilation Process” & the ...
The TypeScript compiler compiles these files and outputs the JavaScript with .js extension by keeping the same file name as the individual ......
Read more >
TypeScript Compiling with Visual Studio Code
It is important to keep in mind that VS Code's TypeScript language service is separate from your installed TypeScript compiler. You can see...
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