1.2.5 • Published 4 years ago

ts-css-modules-webpack-loader v1.2.5

Weekly downloads
13
License
ISC
Repository
github
Last release
4 years ago

ts-css-modules-webpack-loader

Build Status npm version

Take the output of css-loader with css modules and creates a typescript definition of them

For a simpler setup and a verify mode look at css-modules-typescript-loader

Install

npm i -D ts-css-modules-webpack-loader

Example

    loaders: [
      {
        loader: require.resolve("style-loader"),
      },
      {
        loader: require.resolve("ts-css-modules-webpack-loader"),
        options: {
          banner: "//This file is automatically generated, please do not change this file!",
          dest: "./definitions",
          root: "./components",
        },
      },
      {
        loader: require.resolve("css-loader"),
        options: {
          modules: {
            localIdentName: "[name]___[local]",
          },
        },
      },
      {
        loader: require.resolve("sass-loader"),
        query: {
          modules: true,
        },
      },
    ],

Options

Options you can provide to the loader, none is required

OptiondefaultUsage
banner""Printed at the top of every definition file
destthis.contextDefinition folder (will use relative under from root), by default put it next to the css file
rootthis.rootContextRelative root of the tree (in general src is good)
1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago