You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the named exports (#100) is actually a better solution than default export. The problem with exporting an object is that object will persist in the final bundle, and across a large enough app it does have a significant impact in bundle size (maybe not a performance concern, but certainly impacts bytes over the wire and memory). import * from styles is 99/100 the more efficient packaging method.
Situation
I'm currently using
typed-css-modules
to generatecss-modules
types in a snowpack project that uses@babel/plugin-transform-typescript
under the hood.Problem
When building, I get the following error:
Solution
To solve this issue, we can change this line:
typed-css-modules/src/dts-content.ts
Line 53 in 3b9f9e5
To
'export default styles;',
I'll work on a PR for it, but in the meantime, do you see any issues with this approach?
The text was updated successfully, but these errors were encountered: