-
-
Notifications
You must be signed in to change notification settings - Fork 433
multiple instances, errors only shown of single instance #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If multipe typescript instances are used, then the errors of only one instance are outputted to the console. The error has been caused by the removeTSLoaderErrors function that removes the errors for all instances, therefore, only the errors of the last instance are left in the errors array. This is fixed by including the instance name in the loaderSource and refining removeTSLoaderErrors to only remove errors of the same instance. Fixes TypeStrong#268
Related to #54 |
Sorry about the delay in responding. |
Sorry, I'm actually not using ts-loader anymore. Therefore, I'm not going to rework my PR, sorry. |
Fair enough - thanks for letting us know |
Should this option be re-opened? I'm still running into the same problem that @MichaReiser described with webpack I have two
and then |
Feel free to open a new issue that links to this with a minimal repro repo. |
Uh oh!
There was an error while loading. Please reload this page.
Hy
I'm working on a project that targets node and the browser (using web workers). The project consists of a code base that is shared between node and the browser, and other parts that are browser, node or even web worker specific. To benefit the most from type script, multiple type script instances should be used with different libraries included (only es5, es5+dom, es5+web worker...).
Setup
I created a sample project with a similar structure in DatenMetzgerX/ts-loader-multiple-instances. Files located in src/common are es5 only and can be used by node or in the browser. At the other hand, files located in src/browser are specific for the browser environment. Different tsconfig.json files are used for each directory to configure the different libraries (es only, es + dom...). In each directory (common and browser) a single file is located that contains some trivial typescript errors (browser-defaults: a is a string, but a number is assigned, simple.js: n is a number, but a string is assigned).
The webpack configuration contains 2 configured ts-loader instances pointing todifferent tsconfig.json's and are distinguished by their name.
Actual Result
If webpack is executed, only errors of one of the ts-loader instances are shown in detail:
But the output also shows... that simple.ts contains 3 errors, but the error details are not printed to the console (why so ever).
Expected Result
Ts-loader should also output the errors in simple.ts in detail and not only summarize the number of errors behind the asset.
The text was updated successfully, but these errors were encountered: