Viewers
Viewers copied to clipboard
SCSS Error When Compiling Monorepo version
In the previous version of the viewer, I use SCSS to format a modal component. In the monorepo version, with node-sass installed, I get an error saying there is no loader for scss file types. I tried installing node-sass at the root as well as in \platform. Has anyone else seen this problem?
@mtm12, modify ROOT/.webpack/webpack.common.js to use the WebPack SASS Loader. You'll need to add it as a dependency.
I'd be willing to merge the change to master, as I'd like to eventually phase out our stylus usage. The loader for it is "meh", and SASS/SCSS has a larger following and support.
@dannyrb Thank you. To add SCSS support:
- from root: yarn add sass-loader node-sass webpack --save-dev -W
- add the following to module:rules in platform\viewer.webpack\all.dev.js
{
test: /.s[ac]ss$/i,
use: [
// Creates
stylenodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ], },