![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
css-modules-typescript-loader
Advanced tools
Readme
Webpack loader to create TypeScript declarations for CSS Modules.
Emits TypeScript declaration files matching your CSS Modules in the same location as your source files, e.g. src/Component.css
will generate src/Component.css.d.ts
.
There are currently a lot of solutions to this problem. However, this package differs in the following ways:
Encourages generated TypeScript declarations to be checked into source control, which allows webpack
and tsc
commands to be run in parallel in CI.
Ensures committed TypeScript declarations are in sync with the code that generated them via the verify
mode.
Place css-modules-typescript-loader
directly after css-loader
in your webpack config.
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'css-modules-typescript-loader',
{
loader: 'css-loader',
options: {
modules: true
}
}
]
}
]
}
};
Since the TypeScript declarations are generated by webpack
, they may potentially be out of date by the time you run tsc
. To ensure your types are up to date, you can run the loader in verify
mode, which is particularly useful in CI.
For example:
{
loader: 'css-modules-typescript-loader',
options: {
mode: process.env.CI ? 'verify' : 'emit'
}
}
Instead of emitting new TypeScript declarations, this will throw an error if a generated declaration doesn't match the committed one. This allows tsc
and webpack
to run in parallel in CI, if desired.
This workflow is similar to using the Prettier --list-different
option.
This package borrows heavily from typings-for-css-modules-loader.
MIT.
FAQs
Webpack loader to create TypeScript declarations for CSS Modules
The npm package css-modules-typescript-loader receives a total of 59,736 weekly downloads. As such, css-modules-typescript-loader popularity was classified as popular.
We found that css-modules-typescript-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.