Skip to content

Commit

Permalink
build: replace dart-sass to sass
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxjack committed Jul 11, 2023
1 parent 83c2609 commit de355b5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 37 deletions.
44 changes: 21 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,14 @@
"dependencies": {
"@ahooksjs/use-url-state": "^3.1.13",
"@ant-design/icons": "4.7.0",
"@cloudbase/js-sdk": "^1.7.2",
"ahooks": "3.1.13",
"antd": "4.19.0",
"axios": "^0.26.1",
"classnames": "2.3.1",
"copy-to-clipboard": "3.3.1",
"dayjs": "1.10.8",
"echarts": "^5.3.1",
"echarts-for-react": "^3.0.2",
"highlight.js": "11.1.0",
"jinrishici": "^1.0.6",
"markdown-navbar": "^1.4.3",
"marked": "2.1.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-icons": "4.3.1",
"react-redux": "7.2.6",
"react-router-dom": "6.2.2",
"redux": "4.1.2",
"sanitize-html": "^2.7.0"
},
"devDependencies": {
"@babel/core": "7.17.5",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7.16.11",
"@babel/preset-react": "7.16.7",
"@babel/preset-typescript": "7.16.7",
"@babel/runtime-corejs3": "7.17.2",
"@cloudbase/js-sdk": "^1.7.2",
"@commitlint/cli": "16.2.1",
"@commitlint/config-conventional": "16.2.1",
"@redux-devtools/extension": "3.2.2",
Expand All @@ -69,27 +48,46 @@
"@types/webpack-env": "1.16.3",
"@typescript-eslint/eslint-plugin": "5.13.0",
"@typescript-eslint/parser": "5.13.0",
"ahooks": "3.1.13",
"antd": "4.19.0",
"antd-dayjs-webpack-plugin": "1.0.6",
"axios": "^0.26.1",
"babel-loader": "8.2.3",
"babel-plugin-import": "1.13.3",
"classnames": "2.3.1",
"clean-webpack-plugin": "4.0.0",
"copy-to-clipboard": "3.3.1",
"copy-webpack-plugin": "10.2.4",
"cross-env": "7.0.3",
"css-loader": "6.6.0",
"css-minimizer-webpack-plugin": "3.4.1",
"dart-sass": "^1.25.0",
"dayjs": "1.10.8",
"echarts": "^5.3.1",
"echarts-for-react": "^3.0.2",
"eslint": "8.10.0",
"eslint-config-alloy": "4.5.1",
"eslint-plugin-react": "7.29.3",
"eslint-plugin-simple-import-sort": "^7.0.0",
"fork-ts-checker-webpack-plugin": "7.2.1",
"highlight.js": "11.1.0",
"html-webpack-plugin": "5.5.0",
"husky": "4.3.8",
"jinrishici": "^1.0.6",
"less": "4.1.2",
"less-loader": "10.2.0",
"markdown-navbar": "^1.4.3",
"marked": "2.1.3",
"mini-css-extract-plugin": "2.5.3",
"postcss-loader": "6.2.1",
"postcss-preset-env": "7.4.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-icons": "4.3.1",
"react-redux": "7.2.6",
"react-router-dom": "6.2.2",
"redux": "4.1.2",
"sanitize-html": "^2.7.0",
"sass": "^1.63.6",
"sass-loader": "12.6.0",
"style-loader": "3.3.1",
"typescript": "4.6.2",
Expand Down
4 changes: 2 additions & 2 deletions scripts/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module.exports = {
{
loader: 'sass-loader',
options: {
implementation: require('dart-sass'),
implementation: require('sass'),
sourceMap: isDevelopment
}
}
Expand All @@ -202,7 +202,7 @@ module.exports = {
{
loader: 'sass-loader',
options: {
implementation: require('dart-sass'),
implementation: require('sass'),
sourceMap: isDevelopment
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/About/Switch/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $switchWidth: 36px;
.box {
height: $switchWidth;
width: $switchWidth * 2;
border-radius: $switchWidth / 2;
border-radius: calc($switchWidth / 2);
position: relative;
background-color: $themeColor1;

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home/Section/PostCard/PostCardLoading/index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../../../../styles/base.scss';

.postCardLoading {
height: 50px + 80px +80px;
height: 50px + 80px + 80px;
display: flex;
flex-direction: column;
justify-content: space-evenly;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Post/PostTags/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import '../../../styles/style.scss';

.articleTags {
margin-bottom: $space / 2;
margin-bottom: calc($space / 2);

.articleTag {
display: inline-block;
Expand Down
25 changes: 16 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2482,7 +2482,7 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

"chokidar@>=2.0.0 <4.0.0", chokidar@^3.5.3:
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
Expand Down Expand Up @@ -2967,13 +2967,6 @@ dargs@^7.0.0:
resolved "https://registry.npmmirror.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc"
integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==

dart-sass@^1.25.0:
version "1.25.0"
resolved "https://registry.npmmirror.com/dart-sass/-/dart-sass-1.25.0.tgz#e00c0348118916e9d81cb485297184c131af1dad"
integrity sha512-syNOAstJXAmvD3RifcDk3fiPMyYE2fY8so6w9gf2/wNlKpG0zyH+oiXubEYVOy1WAWkzOc72pbAxwx+3OU4JJA==
dependencies:
chokidar ">=2.0.0 <4.0.0"

[email protected]:
version "2.28.0"
resolved "https://registry.npmmirror.com/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2"
Expand Down Expand Up @@ -4121,6 +4114,11 @@ image-size@~0.5.0:
resolved "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==

immutable@^4.0.0:
version "4.3.0"
resolved "https://registry.npmmirror.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be"
integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==

import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
Expand Down Expand Up @@ -6619,6 +6617,15 @@ [email protected]:
klona "^2.0.4"
neo-async "^2.6.2"

sass@^1.63.6:
version "1.63.6"
resolved "https://registry.npmmirror.com/sass/-/sass-1.63.6.tgz#481610e612902e0c31c46b46cf2dad66943283ea"
integrity sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"

sax@^1.2.4:
version "1.2.4"
resolved "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
Expand Down Expand Up @@ -6846,7 +6853,7 @@ sockjs@^0.3.21:
uuid "^8.3.2"
websocket-driver "^0.7.4"

source-map-js@^1.0.2:
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
version "1.0.2"
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
Expand Down

0 comments on commit de355b5

Please sign in to comment.