webpack-config-plugins icon indicating copy to clipboard operation
webpack-config-plugins copied to clipboard

Remove .d.ts extension from the TS Plugin

Open janbiasi opened this issue 7 years ago • 0 comments

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:

janbiasi avatar Nov 20 '18 10:11 janbiasi