Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

fix: css-module support about 'keyframes logo-spin' #416

Open
wants to merge 2 commits into
base: wm-react-scripts-2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions template/images.d.ts → template/shims/images.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ declare module '*.jpeg'
declare module '*.gif'
declare module '*.bmp'
declare module '*.tiff'
declare module '*.css'
declare module '*.scss'
declare module '*.sass'
16 changes: 16 additions & 0 deletions template/shims/styles.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

declare module '*.module.css' {
const exports: { [exportName: string]: string };
export = exports;
}
declare module '*.module.scss' {
const exports: { [exportName: string]: string };
export = exports;
}
declare module '*.module.sass' {
const exports: { [exportName: string]: string };
export = exports;
}
declare module '*.css'
declare module '*.scss'
declare module '*.sass'
8 changes: 4 additions & 4 deletions template/src/App.css → template/src/App.module.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
:local .app {
.app {
text-align: center;
}

:local .logo {
.logo {
animation: logo-spin infinite 20s linear;
height: 40vmin;
}

:local .header {
.header {
background-color: #282c34;
min-height: 100vh;
display: flex;
Expand All @@ -18,7 +18,7 @@
color: white;
}

:local .link {
.link {
color: #61dafb;
}

Expand Down
2 changes: 1 addition & 1 deletion template/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as styles from './App.css';
import * as styles from './App.module.css';
import logo from './logo.svg';

class App extends React.Component {
Expand Down