質問するログイン新規登録

質問編集履歴

2

補足追加

2017/04/09 09:05

投稿

YoshitomoYasuno
YoshitomoYasuno

スコア6

title CHANGED
File without changes
body CHANGED
@@ -161,4 +161,6 @@
161
161
 
162
162
  このときconsole.log(styles)はObject
163
163
  console.log(styles.searchContainer)はundefinedです
164
+ bundle.cssを見たところsearchStyle.cssがoutputされていませんでした
165
+
164
166
  css-modulesでスタイルを当てられるようにするにはどうすればいいでしょうか

1

ファイル名追加

2017/04/09 09:05

投稿

YoshitomoYasuno
YoshitomoYasuno

スコア6

title CHANGED
File without changes
body CHANGED
@@ -15,6 +15,8 @@
15
15
  |-webpack.config.js
16
16
  |-package.json
17
17
 
18
+ webpack.config.js
19
+
18
20
  ```webpack.config.js
19
21
  const webpack = require('webpack')
20
22
  const path = require('path')
@@ -88,6 +90,8 @@
88
90
  ]
89
91
  ```
90
92
 
93
+ Search.js
94
+
91
95
  ```Search.js
92
96
  import React, { Component } from 'react'
93
97
  import 'whatwg-fetch'
@@ -141,6 +145,8 @@
141
145
  export default Search
142
146
  ```
143
147
 
148
+ searchStyles.css
149
+
144
150
  ```searchStyles.css
145
151
  .searchContainer {
146
152
  width: 100%;