Closed Lantianyou closed 1 year ago
My point is, there is two ways to use this package, and readme section of webpack is unnecessary
Thanks for the extra method! I will definitely add it. It seems nicer than typeRoots
.
I don't know anything about Webpack, someone contributed that bit of the instructions (cc @darionco). It seems Webpack has its own way to configure additional types. If you set the tsconfig option, do either of you know if then, you don't need the webpack.config.js option? If so, I'd prefer to remove the Webpack section.
In fact as it already says in the readme: "(may not be necessary with tsc
config above - untested)" 🙂
BTW to clarify - the webpack instructions are definitely not needed if you don't use webpack already. I just don't know if you need them if you are using webpack.
Thanks for your reply. Now I see why there is a section about webpack in the first place. Luckily, I do not use Webpack.
I will close this issue as you have already answered my question
Thanks for confirming! And thanks for reporting, I was able to improve the README.
According to the docs, seems we can also use
types
without webpackhttps:www.typescriptlang.org/tsconfig#typeRoots
like this: