Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit a4f5971

Browse files
committed
update webpack config for scss
1 parent d5faf08 commit a4f5971

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,17 @@
3939
"expose-loader": "^4.1.0",
4040
"postcss-loader": "^7.0.2",
4141
"prettier": "^2.8.4",
42-
"sass": "^1.42.1",
43-
"sass-loader": "^12.1.0",
42+
"sass": "^1.59.2",
43+
"sass-loader": "^13.2.0",
4444
"stylelint": "^13.13.1",
4545
"stylelint-declaration-use-variable": "^1.7.3",
4646
"stylelint-prettier": "^1.2.0",
4747
"stylelint-webpack-plugin": "^4.1.0",
4848
"webpack": "^5.76.1",
4949
"webpack-cli": "^5.0.1",
5050
"webpack-dev-server": "^4.11.1",
51-
"terser-webpack-plugin": "^5.3.7"
51+
"terser-webpack-plugin": "^5.3.7",
52+
"node-sass": "^8.0.0"
5253
},
5354
"scripts": {
5455
"test": "echo \"Error: no test specified\" && exit 1",

src/assets/scss/style.scss

Whitespace-only changes.

webpack.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const config = {
1515
// CSS
1616
'./src/assets/css/style.css',
1717

18+
// SCSS
19+
'./src/assets/scss/style.scss',
20+
1821
// JS
1922
'./src/assets/js/script.js',
2023
]
@@ -42,6 +45,15 @@ const config = {
4245
},
4346
],
4447
},
48+
{
49+
test: /\.(scss|sass)$/,
50+
use: [
51+
MiniCssExtractPlugin.loader,
52+
"css-loader",
53+
"postcss-loader",
54+
"sass-loader",
55+
],
56+
},
4557
{
4658
test: /\.svg/,
4759
type: "asset",

0 commit comments

Comments
 (0)