jacob-ebey / webpack-federated-stats-plugin

Write out relevant federation stats to a file for further consumption.
17 stars 6 forks source link

Expose library types #5

Open tehciolo opened 2 years ago

tehciolo commented 2 years ago

Is it possible to export the library types for consumption?

Thanks!

jacob-ebey commented 2 years ago

Go for it.

tehciolo commented 2 years ago

@jacob-ebey

I initially attempted to convert index.js to TypeScript and add a compilation step, but I got tripped up by some internal webpack types.

What I ended up doing instead is exposing some more of the types, by moving those defined using JSDoc comments in index.js to the types file (webpack-stats-types.ts). These can be consumed by importing from webpack-federated-stats-plugin/webpack-stats-types.

Here's the PR: https://github.com/jacob-ebey/webpack-federated-stats-plugin/pull/6