Skip to content

Commit 2d6b51a

Browse files
committed
chore: update env
1 parent 79a910b commit 2d6b51a

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

docs/更新日志.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ abbrlink: 179nqpxt
66

77
`create-react-doc` 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范。
88

9+
### 1.8.2
10+
11+
`2022-02-02`
12+
13+
- **Enhancement**
14+
15+
- 🎈 支持在本地环境调试项目源代码。[mr](https://github.com/MuYunyun/create-react-doc/pull/249)
16+
917
### 1.8.1
1018

1119
`2022-01-17`

packages/crd-client-utils/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ const ifDev = env === 'dev'
44
const ifProd = env === 'prod'
55
const ifPrerender = window.__PRERENDER_INJECTED && window.__PRERENDER_INJECTED.prerender
66

7-
const useEnhancedEffect = typeof window !== 'undefined'
7+
// Not only Prod env but also [some part of Dev env](https://github.com/MuYunyun/create-react-doc/blob/main/packages/crd-scripts/src/web/index.js#L10-L13)
8+
// need using useLayoutEffect. If meeting this case in the future, thinking about passing extra tag from <RouterRoot />.
9+
const useEnhancedEffect = ifProd
810
? useLayoutEffect
911
: useEffect
1012

packages/crd-scripts/src/conf/webpack.config.dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const paths = require('./path')
1212
module.exports = function (cmd) {
1313
const docsConfig = getDocsConfig()
1414
config.mode = 'development'
15+
config.devtool = 'eval-source-map'
1516
config.entry = [
1617
require.resolve('react-hot-loader/patch'),
1718
require.resolve('webpack-hot-dev-clients/webpackHotDevClient'),

0 commit comments

Comments
 (0)