Skip to content

Commit adac7c3

Browse files
authored
Add default export to definition file
When using the `style-loader`, the `locals` object gets invisibly murdered. Fixes Jimdo/typings-for-css-modules-loader#20. If someone's not using the `style-loader` they can `import {locals}`, and if they _are_ using the `style-loader`, they can use the default import. This should make everyone happy, and be fully backwards-compatible.
1 parent 2bb351f commit adac7c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cssModuleToInterface.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,6 @@ ${interfaceProperties}
9595
}
9696
9797
export const locals: ${interfaceName};
98+
export default locals;
9899
`);
99100
};

0 commit comments

Comments
 (0)