Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olegstepura/typed-css-modules-loader
💠Webpack loader for typed-css-modules auto-creation
https://github.com/olegstepura/typed-css-modules-loader
css-modules loader typescript webpack-loader
Last synced: 2 months ago
JSON representation
💠Webpack loader for typed-css-modules auto-creation
- Host: GitHub
- URL: https://github.com/olegstepura/typed-css-modules-loader
- Owner: olegstepura
- License: mit
- Created: 2016-05-20T09:25:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T02:20:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T03:04:09.073Z (2 months ago)
- Topics: css-modules, loader, typescript, webpack-loader
- Language: JavaScript
- Homepage:
- Size: 243 KB
- Stars: 62
- Watchers: 3
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - typed-css-modules-loader - css-modules auto-creation | olegstepura | 62 | (JavaScript)
README
# typed-css-modules-loader
Simplest webpack loader for https://github.com/Quramy/typed-css-modules
I suggest using it as preloader. Unless you change the options (see below), it
will generate `.css.d.ts` files near the `.css`. Please take a look at
[this discussion](https://github.com/Quramy/typed-css-modules/issues/2) to make a decision.It has one option - noEmit, which turns off emitting files to the output path of webpack.
You can affect how `typed-css-modules` behaves by using query parameters. The loader
will pass any query parameters you specify (excluding noEmit) to the constructor of the `DtsCreator`
class. For more info on available options, please take a look here:
[DtsCreator constructor](https://github.com/Quramy/typed-css-modules#new-dtscreatoroption).```js
const settings = {
// ...
module: {
loaders: [
// ...
{
enforce: 'pre',
test: /\.css$/,
exclude: /node_modules/,
loader: 'typed-css-modules-loader'
// or in case you want to use parameters:
// loader: 'typed-css-modules?outDir=/tmp'
// or in case you want to use noEmit:
// loader: 'typed-css-modules?noEmit'
}
],
}
// ...
}
```