Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Suppress some diagnostics #61

Closed
just-boris opened this issue Oct 16, 2015 · 2 comments
Closed

Suppress some diagnostics #61

just-boris opened this issue Oct 16, 2015 · 2 comments

Comments

@just-boris
Copy link

I get the following output at the end of webpack build

ERROR in [default]
File 'src/layouts/application/AppLayout.hbs' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts'.

ERROR in [default] src/app.ts:2:22
Cannot find module './layouts/application/AppLayout.ts'.

ERROR in [default] src/index.ts:3:16
Cannot find module './app.ts'.

ERROR in [default] src/layouts/application/AppLayout.ts:4:26
Cannot find module './AppLayout.hbs'.

All files actually have been successfully imported by webpack, but during typescript compilation it doesn't know about it and report errors.

Now it always written in console output and distracts from real errors. It would be nice to have ability to disable errors by its code.

These errors has following codes
TS2307 - Cannot find module
TS6054 -File has unsupported extension.

@just-boris
Copy link
Author

Also, found that breaks ExtractTextPlugin.
It refuses to extract content if it has erorrs. See this commit.

Because errors from comment above is not actually an error, it should not be reported to webpack and break other plugins

@s-panferov
Copy link
Owner

I believe that now it can be achieved by allowNonTsExtensions tsconfig option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants