Skip to content

Commit ca75710

Browse files
committed
added support for scss files with sass-loader, style-loaoder, and css-loader webpack plugins
1 parent 2b0a21f commit ca75710

File tree

6 files changed

+390
-36
lines changed

6 files changed

+390
-36
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
dist
33
.DS_Store
44
.env.production
5-
.env.development
5+
.env.development
6+
package-lock.json

build-utils/webpack.common.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,22 @@ module.exports = {
1212
test: /\.(js|jsx)$/,
1313
exclude: /node_modules/,
1414
use: ['babel-loader']
15-
}
15+
},
16+
{
17+
test: /\.s[ac]ss$/i,
18+
use: [
19+
// Creates `style` nodes from JS strings
20+
'style-loader',
21+
// Translates CSS into CommonJS
22+
'css-loader',
23+
// Compiles Sass to CSS
24+
'sass-loader',
25+
],
26+
},
1627
]
1728
},
1829
resolve: {
19-
extensions: ['*', '.js', '.jsx']
30+
extensions: ['*', '.js', '.jsx', '.scss']
2031
},
2132
output: {
2233
path: path.resolve(__dirname, '../', 'dist'),

0 commit comments

Comments
 (0)