Skip to content

Commit 6e1ff80

Browse files
committed
Fix production build empty class name
- webpack-contrib/mini-css-extract-plugin#9
1 parent 44b77fa commit 6e1ff80

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

components/user-list/UserList.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class UserList extends Component {
4545
))}
4646
{!isFetching &&
4747
currentPage < totalPages && (
48-
<a className={styles.loadMore} href onClick={this.loadMore}>
48+
<a className={styles.loadMore} href="#see-more" onClick={this.loadMore}>
4949
Load more...
5050
</a>
5151
)}

webpack.common.js

-13
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,6 @@ module.exports = {
2121
{
2222
test: /\.(js|jsx)$/,
2323
loader: 'babel-loader'
24-
},
25-
{
26-
test: /\.scss$/,
27-
use: [
28-
'style-loader',
29-
{
30-
loader: 'css-loader',
31-
options: {
32-
modules: true
33-
}
34-
},
35-
'sass-loader'
36-
]
3724
}
3825
]
3926
},

webpack.dev.js

+17
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@ module.exports = merge(common, {
88
contentBase: './dist',
99
hot: true
1010
},
11+
module: {
12+
rules: [
13+
{
14+
test: /\.scss$/,
15+
use: [
16+
'style-loader',
17+
{
18+
loader: 'css-loader',
19+
options: {
20+
modules: true,
21+
},
22+
},
23+
'sass-loader'
24+
]
25+
}
26+
]
27+
},
1128
plugins: [
1229
new webpack.NamedModulesPlugin(),
1330
new webpack.HotModuleReplacementPlugin()

0 commit comments

Comments
 (0)