diff --git a/packages/react-server-cli/src/compileClient.js b/packages/react-server-cli/src/compileClient.js index 142e3bddf..3b4f2a413 100644 --- a/packages/react-server-cli/src/compileClient.js +++ b/packages/react-server-cli/src/compileClient.js @@ -164,7 +164,7 @@ const packageCodeForBrowser = (entrypoints, outputDir, outputUrl, hot, minify, l exclude: /node_modules/, }, { - test: /\.scss$/, + test: /\.s(a|c)ss$/, loader: extractTextLoader + "!sass-loader", exclude: /node_modules/, }, diff --git a/packages/react-server-cli/src/index.js b/packages/react-server-cli/src/index.js index 4ef815bef..faf124727 100644 --- a/packages/react-server-cli/src/index.js +++ b/packages/react-server-cli/src/index.js @@ -5,6 +5,7 @@ const parseCliArgs = require("./parseCliArgs").default; require.extensions['.css'] = require.extensions['.less'] = require.extensions['.scss'] = +require.extensions['.sass'] = function(module, filename) { return module._compile("", filename); }; diff --git a/packages/react-server-test-pages/pages/styles/sass.js b/packages/react-server-test-pages/pages/styles/sass.js index 4f776cd59..368a341a3 100644 --- a/packages/react-server-test-pages/pages/styles/sass.js +++ b/packages/react-server-test-pages/pages/styles/sass.js @@ -1,9 +1,14 @@ import "./sass.scss" +import "./sass.sass" const RedThing = () =>
This should be red
+const BlueThing = () =>
This should be blue
export default class SassPage { getElements() { - return + return (
+ + +
); } } diff --git a/packages/react-server-test-pages/pages/styles/sass.sass b/packages/react-server-test-pages/pages/styles/sass.sass new file mode 100644 index 000000000..1da2e717a --- /dev/null +++ b/packages/react-server-test-pages/pages/styles/sass.sass @@ -0,0 +1,4 @@ +$blueish: blue + +.blue-thing + background-color: $blueish