Permalink
Browse files

Add support for SASS files

  • Loading branch information...
aaccurso committed May 28, 2017
1 parent 4e5f556 commit e7a9707d85bd88a3f460e5b62661357e331fccae
@@ -160,7 +160,7 @@ module.exports = {
exclude: [
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.(css|scss)$/,
/\.json$/,
/\.bmp$/,
/\.gif$/,
@@ -200,19 +200,27 @@ module.exports = {
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "sass" loader compiles SASS files to CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
{
test: /\.css$/,
test: /\.(css|scss)/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
},
sourceMap: true
}
},
{
loader: require.resolve('sass-loader'),
options: {
sourceMap: true
}
},
{
loader: require.resolve('postcss-loader'),
@@ -195,6 +195,7 @@ module.exports = {
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
// "sass" loader compiles SASS files to CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader normally turns CSS into JS modules injecting <style>,
// but unlike in development configuration, we do something different.
@@ -220,6 +221,12 @@ module.exports = {
sourceMap: true,
},
},
{
loader: require.resolve('sass-loader'),
options: {
sourceMap: true
}
},
{
loader: require.resolve('postcss-loader'),
options: {
@@ -60,8 +60,10 @@
"whatwg-fetch": "2.0.3"
},
"devDependencies": {
"node-sass": "^4.5.3",
"react": "^15.5.4",
"react-dom": "^15.5.4"
"react-dom": "^15.5.4",
"sass-loader": "^6.0.5"
},
"optionalDependencies": {
"fsevents": "1.0.17"
Oops, something went wrong.

0 comments on commit e7a9707

Please sign in to comment.