webpack-config-plugins
webpack-config-plugins copied to clipboard
Remove .d.ts extension from the TS Plugin
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
- Check out the latest Nitro version
- Install Gondel
- Enable TS in the config
- Watch the build fail (even if no TS files provided)
Environment
Plugin version: *
- Node version: 8
- Platform: Mac & Windows
Others: