dividab / tsconfig-paths-webpack-plugin

Load modules according to tsconfig paths in webpack.
MIT License
596 stars 51 forks source link

Typo in example/webpack.config.js ? #77

Open parus95 opened 3 years ago

parus95 commented 3 years ago

I created webpack.config.js for my app based on https://github.com/dividab/tsconfig-paths-webpack-plugin/blob/master/example/webpack.config.js

I was getting build errors for TS files containing types information.

File https://github.com/dividab/tsconfig-paths-webpack-plugin/blob/988a5c70ac2ad68c576af8be722cfc848f32eabb/example/webpack.config.js#L15 has line test: /\\.tsx?$/, but ts-loader documentation ( https://www.npmjs.com/package/ts-loader#configuration ) contains test: /\.tsx?$/ pattern (without double slash).

I changed double slash to single in my config. Build was succesful.

I suppose there is an error in the file, but it does not manifests up because the TS files in this example do not use types.