typed-css-modules-loader

2019-07-10 admin

typed-css-modules-loader是什么

什么是typed-css-modules-loader,Webpack loader for typed-css-modules

typed-css-modules-loader使用教程帮助文档

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 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.

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'
      }
    ],
  }
  // ...
}

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-69358.html

文章标题:typed-css-modules-loader

回到顶部