Skip to content

Commit

Permalink
Merge pull request #110 from Bartekus/scss-sass-integration
Browse files Browse the repository at this point in the history
Sass/SCSS Integration

Conflicts:
	.gitignore
	package.json
  • Loading branch information
KyleAMathews committed Feb 18, 2016
2 parents cceeb78 + 5704a2d commit 06215d5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ examples/biz-website/public/
examples/blog/public/
*.un~
dist
bin/published.js
15 changes: 13 additions & 2 deletions lib/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>

function resolve () {
return {
extensions: ['', '.js', '.jsx', '.cjsx', '.coffee', '.json', '.less', '.toml', '.yaml'],
extensions: ['', '.js', '.jsx', '.cjsx', '.coffee', '.json', '.less', '.scss', '.sass', '.toml', '.yaml'],
modulesDirectories: [
directory,
`${__dirname}/../isomorphic`,
Expand Down Expand Up @@ -213,6 +213,10 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>
test: /\.less/,
loaders: ['style', 'css', 'less'],
})
config.loader('sass', {
test: /\.(sass|scss)/,
loaders: ['style', 'css', 'sass'],
})
config.loader('js', {}, (cfg) => {
cfg.loaders.unshift('react-hot')
return cfg
Expand All @@ -232,6 +236,10 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>
test: /\.less/,
loaders: ['css', 'less'],
})
config.loader('sass', {
test: /\.(sass|scss)/,
loaders: ['css', 'sass'],
})
return config

case 'production':
Expand All @@ -243,7 +251,10 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>
test: /\.less/,
loaders: ['style', 'css', 'less'],
})

config.loader('sass', {
test: /\.(sass|scss)/,
loaders: ['style', 'css', 'sass'],
})
return config

default:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"negotiator": "^0.6.0",
"node-cjsx": "^1.0.0",
"node-libs-browser": "^0.5.2",
"node-sass": "^3.4.2",
"null-loader": "^0.1.1",
"object-assign": "^4.0.1",
"parse-filepath": "^0.6.3",
Expand All @@ -48,6 +49,7 @@
"react-hot-loader": "^1.3.0",
"react-router": "^0.13.5",
"static-site-generator-webpack-plugin": "^2.0.1",
"sass-loader": "^3.1.2",
"style-loader": "^0.13.0",
"toml": "^2.2.2",
"toml-loader": "^1.0.0",
Expand Down

0 comments on commit 06215d5

Please sign in to comment.