Skip to content
This repository was archived by the owner on Oct 30, 2020. It is now read-only.
This repository was archived by the owner on Oct 30, 2020. It is now read-only.

Generated typings not compatible with project #20

Open
TeamSupercell/typings-for-css-modules-loader
#2
@aaronbeall

Description

@aaronbeall

I am using this loader setup for TypeScript and PostCSS with Webpack 1.13.1:

{
  test: /\.tsx?$/,
  loader: 'ts',
  exclude: /node_modules/
},
{
  test: /\.css$/,
  loader: 'style!typings-for-css-modules?modules&camelCase!postcss',
  //loader: 'style!css!postcss'
}

(The commented out css loader is the previous setup which works without CSS modules.)

When I import a .css file using import {locals as styles} from "./example.css" as the generated typings indicate, I get nothing at runtime. If I use import * as styles from "./example.css" I see all the class names at runtime, but still no locals, and TypeScript flags errors for all references, such as styles.myClassName.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions