File tree Expand file tree Collapse file tree 3 files changed +61
-56
lines changed Expand file tree Collapse file tree 3 files changed +61
-56
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# extract-react-types-loader
2
2
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [ ` 1ec5f76 ` ] ( https://github.com/atlassian/extract-react-types/commit/1ec5f76c5e99ce78e952a83eac178fcc22e5f557 ) [ #196 ] ( https://github.com/atlassian/extract-react-types/pull/196 ) Thanks [ @marionebl ] ( https://github.com/marionebl ) ! - Remove Atlaskit specific process.env switches (#195 )
8
+
9
+ BREAKING CHANGE
10
+ This removes the previously available process.env switches to conditionally disable the loader.
11
+ To restore the previous behaviour you'll have to use the ` resolveLoader ` webpack config, e.g.
12
+
13
+ ``` js
14
+ // webpack.config.js
15
+ const enabled =
16
+ [' production' , ' staging' ].includes (process .env .WEBSITE_ENV ) ||
17
+ process .env .FORCE_EXTRACT_REACT_TYPES ;
18
+
19
+ module .exports = {
20
+ /* ... */
21
+ resolveLoader: {
22
+ alias: {
23
+ ' extract-react-types-loader' : enabled
24
+ ? undefined
25
+ : require .resolve (' ./noop-extract-react-types-loader' )
26
+ }
27
+ }
28
+ };
29
+ ```
30
+
31
+ ``` js
32
+ // noop-extract-react-types-loader.js
33
+ module .exports = function noopExtractReactPropTypesLoader () {
34
+ return ` module.exports = {
35
+ component: {
36
+ kind: 'object',
37
+ members: [
38
+ {
39
+ kind: 'property',
40
+ key: { kind: 'id', name: 'Warning' },
41
+ value: { kind: 'any' },
42
+ optional: false,
43
+ leadingComments: [
44
+ {
45
+ type: 'commentBlock',
46
+ value: ` extract- react- types is not being run in dev mode for speed reasons . If you need to
47
+ see prop types add the environment variable \` FORCE_EXTRACT_REACT_TYPES\`
48
+ raw: '**'
49
+ }
50
+ ],
51
+ default: {
52
+ kind: 'string',
53
+ value: 'Prop types are not shown in dev mode'
54
+ }
55
+ }
56
+ ],
57
+ referenceIdName: 'NoopPropTpes'
58
+ }
59
+ };`
60
+ }
61
+ ```
62
+
3
63
## 0.3.17
4
64
5
65
### Patch Changes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " extract-react-types-loader" ,
3
- "version" : " 0.3.17 " ,
3
+ "version" : " 1.0.0 " ,
4
4
"main" : " index.js" ,
5
5
"repository" : " atlassian/extract-react-types" ,
6
6
"description" : " Load extract-react-types data given a fiile path, using webpack" ,
You can’t perform that action at this time.
0 commit comments