Skip to content

Commit abc238c

Browse files
committed
Fixes 9.2.2
1 parent 8e1f791 commit abc238c

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

_old_corrections/개정판-1쇄.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,64 @@ useEffect(() => {
4747
+ }, [name]);
4848
```
4949

50+
## 9.2.2 (pg. 230, 231)
51+
52+
`sass-loader`가 업데이트 됨에 따라 설정 방법이 바뀌었습니다. `includePaths`를 설정 할 때 `sassOptions` 객체 안에 넣어서 설정하셔야 합니다.
53+
54+
```diff
55+
{
56+
test: sassRegex,
57+
exclude: sassModuleRegex,
58+
use: getStylesLoaders({
59+
importLoaders: 2,
60+
sourceMap: isEnvProduction && shouldUseSourceMap
61+
- }).concat({
62+
- loader: require.resolve('sass-loader'),
63+
- options: {
64+
- includePaths: [paths.appSrc + '/styles'],
65+
- sourceMap: isEnvProduction && shouldUseSourceMap }
66+
- }),
67+
+ }).concat({
68+
+ loader: require.resolve('sass-loader'),
69+
+ options: {
70+
+ sassOptions: {
71+
+ includePaths: [paths.appSrc + '/styles']
72+
+ },
73+
+ sourceMap: isEnvProduction && shouldUseSourceMap,
74+
+ }
75+
+ }),
76+
sideEffects: true
77+
}
78+
```
79+
80+
추가적으로, `data``prependData` 로 변경됐습니다.
81+
82+
```diff
83+
{
84+
test: sassRegex,
85+
exclude: sassModuleRegex,
86+
use: getStylesLoaders({
87+
importLoaders: 2,
88+
sourceMap: isEnvProduction && shouldUseSourceMap
89+
}).concat({
90+
loader: require.resolve('sass-loader'),
91+
- options: {
92+
- includePaths: [paths.appSrc + '/styles'],
93+
- sourceMap: isEnvProduction && shouldUseSourceMap,
94+
- data: `@import 'utils';`
95+
- }
96+
+ options: {
97+
+ sassOptions: {
98+
+ includePaths: [paths.appSrc + '/styles']
99+
+ },
100+
+ sourceMap: isEnvProduction && shouldUseSourceMap,
101+
+ prependData: `@import 'utils';`
102+
+ }
103+
}),
104+
sideEffects: true
105+
}
106+
```
107+
50108
## 11.6 (pg. 302)
51109

52110
헷갈릴 수 있는 설명이 있어서 이를 수정합니다.

corrections.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,64 @@
1515
- 이 함수가 호출되면 현재 클래스형 컴포넌트가 상속받고 있는 리액트의...
1616
```
1717

18+
## 9.2.2 (pg. 230, 231)
19+
20+
`sass-loader`가 업데이트 됨에 따라 설정 방법이 바뀌었습니다. `includePaths`를 설정 할 때 `sassOptions` 객체 안에 넣어서 설정하셔야 합니다.
21+
22+
```diff
23+
{
24+
test: sassRegex,
25+
exclude: sassModuleRegex,
26+
use: getStylesLoaders({
27+
importLoaders: 2,
28+
sourceMap: isEnvProduction && shouldUseSourceMap
29+
- }).concat({
30+
- loader: require.resolve('sass-loader'),
31+
- options: {
32+
- includePaths: [paths.appSrc + '/styles'],
33+
- sourceMap: isEnvProduction && shouldUseSourceMap }
34+
- }),
35+
+ }).concat({
36+
+ loader: require.resolve('sass-loader'),
37+
+ options: {
38+
+ sassOptions: {
39+
+ includePaths: [paths.appSrc + '/styles']
40+
+ },
41+
+ sourceMap: isEnvProduction && shouldUseSourceMap,
42+
+ }
43+
+ }),
44+
sideEffects: true
45+
}
46+
```
47+
48+
추가적으로, `data``prependData` 로 변경됐습니다.
49+
50+
```diff
51+
{
52+
test: sassRegex,
53+
exclude: sassModuleRegex,
54+
use: getStylesLoaders({
55+
importLoaders: 2,
56+
sourceMap: isEnvProduction && shouldUseSourceMap
57+
}).concat({
58+
loader: require.resolve('sass-loader'),
59+
- options: {
60+
- includePaths: [paths.appSrc + '/styles'],
61+
- sourceMap: isEnvProduction && shouldUseSourceMap,
62+
- data: `@import 'utils';`
63+
- }
64+
+ options: {
65+
+ sassOptions: {
66+
+ includePaths: [paths.appSrc + '/styles']
67+
+ },
68+
+ sourceMap: isEnvProduction && shouldUseSourceMap,
69+
+ prependData: `@import 'utils';`
70+
+ }
71+
}),
72+
sideEffects: true
73+
}
74+
```
75+
1876
## 11.6 (pg. 302)
1977

2078
헷갈릴 수 있는 설명이 있어서 이를 수정합니다.

0 commit comments

Comments
 (0)