Skip to content

Commit

Permalink
Merge pull request #125 from scout-ch/craco-with-sass
Browse files Browse the repository at this point in the history
move from less to sass, move fonts to styling

I moved the commits configuring React from scratch, moving away from Create React App without ejecting, to it's separate branch as the overhead is not justifiable currently. For now, we can continue using craco with sass.
  • Loading branch information
bodobraegger authored Aug 27, 2023
2 parents 91fe581 + 0a6e5e7 commit b94d9df
Show file tree
Hide file tree
Showing 73 changed files with 339 additions and 15 deletions.
20 changes: 10 additions & 10 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const CracoLessPlugin = require("craco-less");

const emotionBabelPreset = require("@emotion/babel-preset-css-prop").default(
undefined,
{} // emotion preset options
);

module.exports = {
plugins: [{ plugin: CracoLessPlugin }],
babel: {
plugins: [
...emotionBabelPreset.plugins
]
}
style: {
sass: {
loaderOptions: {
// Prefer 'sass' (dart-sass) over 'node-sass' if both packages are installed.
implementation: require('sass'),
// Workaround for this bug: https://github.com/webpack-contrib/sass-loader/issues/804
webpackImporter: false,
},
},
},
};
41 changes: 41 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/babel-preset-css-prop": "^11.10.0",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
Expand Down Expand Up @@ -39,8 +38,8 @@
"@types/react-helmet": "^6.1.6",
"@types/react-router-dom": "^5.3.3",
"@types/react-router-hash-link": "^2.4.5",
"craco-less": "2.1.0-alpha.0",
"react-scripts": "^5.0.1",
"sass": "^1.66.1",
"serve": "^14.2.0"
},
"scripts": {
Expand Down
Loading

0 comments on commit b94d9df

Please sign in to comment.