Skip to content

Commit

Permalink
[Delivers #187584859] Setup sample sass styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ndahimana154 committed Jul 1, 2024
1 parent 3162e08 commit 013268b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
31 changes: 31 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@types/fork-ts-checker-webpack-plugin": "^0.4.5",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.9",
"@types/mini-css-extract-plugin": "^2.5.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/webpack-dev-server": "^4.7.2",
Expand Down
12 changes: 12 additions & 0 deletions webpack.prod.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import ESLintPlugin from 'eslint-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import MiniCssExtractPlugin from "mini-css-extract-plugin";

const config: Configuration = {
mode: 'production',
Expand All @@ -31,6 +32,14 @@ const config: Configuration = {
},
},
},
{
test: /\.scss$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"sass-loader"
],
},
],
},
resolve: {
Expand All @@ -52,6 +61,9 @@ const config: Configuration = {
],
}),
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "[name].[contenthash].css",
}),
],
};

Expand Down

0 comments on commit 013268b

Please sign in to comment.