Skip to content

Remove .d.ts extension from the TS Plugin #18

Description

@janbiasi

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

If you have a project (Nitro for example) with Babel and no TypeScript files it will include the d.ts files in the build cycle which fails because d.ts files are not compilable whether by the ts-loader nor the fork plugin. We already tested out that if we remove the .d.ts in the resolver extensions everything works as expected (also detecting typing issues in Gondel for example).

Described line is in https://github.com/namics/webpack-config-plugins/blob/master/packages/ts-config-webpack-plugin/src/TsConfigWebpackPlugin.js#L71

Expected behavior

It should not throw an error in case of d.ts imports.

Minimal reproduction of the problem with instructions

  1. Check out the latest Nitro version
  2. Install Gondel
  3. Enable TS in the config
  4. Watch the build fail (even if no TS files provided)

Environment


Plugin version: *

 
- Node version: 8  
- Platform:  Mac & Windows 

Others:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcheckts-configts-config-webpack-plugin

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions