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
{{ message }}
This repository was archived by the owner on Oct 30, 2020. It is now read-only.
I forked typings-for-css-modules-loader, applied some of the pull requests, made it compatible with css-loader >= 1 and simplified configuration options. You're very welcome to try it and provide any feedback. https://github.com/TeamSupercell/typings-for-css-modules-loader
There's a list of changes
Changes
Upgrade all dependencies and ensure the loader works with webpack>=4 and css-loader>=0.28.11
Remove babel build - make the loader compatible with Node 8+ without additional build steps.
Change the loader from being a drop-in replacement of css-loader to be used alongside css-loader.
Remove orderAlphabetically options - the output keys are sorted by default
Remove namedExport and camelCase options. Generated type definition files now have default export and can both export locals and support dashes in property names out of box. Example:
Use the built-in webpack logger to report errors. Remove the silent options because it becomes redundant
Add a new formatter option to allow formatting the generated files with prettier. That should solve the eol issues and apply consistent code style with other files in the code base.
Hello everyone,
I forked
typings-for-css-modules-loader, applied some of the pull requests, made it compatible with css-loader >= 1 and simplified configuration options. You're very welcome to try it and provide any feedback.https://github.com/TeamSupercell/typings-for-css-modules-loader
There's a list of changes
Changes
webpack>=4andcss-loader>=0.28.11css-loaderto be used alongsidecss-loader.orderAlphabeticallyoptions - the output keys are sorted by defaultnamedExportandcamelCaseoptions. Generated type definition files now have default export and can both exportlocalsand support dashes in property names out of box. Example:silentoptions because it becomes redundantformatteroption to allow formatting the generated files withprettier. That should solve theeolissues and apply consistent code style with other files in the code base.Upgrade guide:
module.exports = { module: { rules: [ { test: /\.css$/i, use: [ "style-loader", { loader: "@teamsupercell/typings-for-css-modules-loader", options: { // pass all the options for `css-loader` to `css-loader`, eg. - namedExport: true } }, + { + loader: "css-loader", + options: { + namedExport: true + } + }, ] } ] } };allowSyntheticDefaultImportsTypeScript compiler option if there are type errors related to default imports