@graphcommerce/next-config 3.0.3 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,163 +1,152 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
8
+
9
+ ## 3.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#1341](https://github.com/graphcommerce-org/graphcommerce/pull/1341) [`47a03c6c7`](https://github.com/graphcommerce-org/graphcommerce/commit/47a03c6c764cb1f544d3de3af52456608694a9d7) Thanks [@paales](https://github.com/paales)! - Files in node_modules/@graphcommerce will now also be watched and won’t be cached
14
+
15
+ ### Patch Changes
16
+
17
+ - [#1341](https://github.com/graphcommerce-org/graphcommerce/pull/1341) [`2e29c5852`](https://github.com/graphcommerce-org/graphcommerce/commit/2e29c585247d356e3027be92beb7815f2070c855) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
18
+
19
+ ## 3.0.4
20
+
21
+ ### Patch Changes
22
+
23
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
24
+
25
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
26
+
3
27
  ## 3.0.3
4
28
 
5
29
  ### Patch Changes
6
30
 
7
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
8
- Thanks [@paales](https://github.com/paales)! - made packages public
31
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
9
32
 
10
- * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278)
11
- [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20)
12
- Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
33
+ * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278) [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
13
34
 
14
35
  ## 3.0.2
15
36
 
16
37
  ### Patch Changes
17
38
 
18
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
19
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
20
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
21
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
22
- duplicate packages in the node_modules folders.
39
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
23
40
 
24
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
25
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
26
- Thanks [@paales](https://github.com/paales)! - Upgraded to
27
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
28
- implementing
29
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
30
- soon.
41
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
31
42
 
32
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
33
- frontend to be able to revalidate pages manually.
43
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
34
44
 
35
45
  ## 3.0.1
36
46
 
37
47
  ### Patch Changes
38
48
 
39
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
40
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
41
- so that the packages link to back to the website and repository
49
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
42
50
 
43
51
  ## 3.0.0
44
52
 
45
53
  ### Major Changes
46
54
 
47
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
48
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
49
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
55
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
50
56
 
51
- All notable changes to this project will be documented in this file. See
52
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
57
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
53
58
 
54
59
  # [2.109.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.108.0...@graphcommerce/next-config@2.109.0) (2021-11-12)
55
60
 
56
61
  ### Features
57
62
 
58
- - added tons of translations
59
- ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
63
+ - added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
60
64
 
61
65
  # [2.108.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.107.3...@graphcommerce/next-config@2.108.0) (2021-11-09)
62
66
 
63
67
  ### Features
64
68
 
65
- - **next-config:** support for .po files to be imported
66
- ([79b64ce](https://github.com/ho-nl/m2-pwa/commit/79b64ce9b444fcf620279d9a8e5d253b8e9cfa84))
69
+ - **next-config:** support for .po files to be imported ([79b64ce](https://github.com/ho-nl/m2-pwa/commit/79b64ce9b444fcf620279d9a8e5d253b8e9cfa84))
67
70
 
68
71
  # [2.107.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.106.1...@graphcommerce/next-config@2.107.0) (2021-10-27)
69
72
 
70
73
  ### Features
71
74
 
72
- - **nextjs:** upgraded to nextjs 12
73
- ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
75
+ - **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
74
76
 
75
77
  # [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.105.1...@graphcommerce/next-config@2.106.0) (2021-10-20)
76
78
 
77
79
  ### Features
78
80
 
79
- - **next-config:** support topLevelAwait
80
- ([3cb4f90](https://github.com/ho-nl/m2-pwa/commit/3cb4f90ac3af797f5fcba888dfd28aa2b76480b8))
81
+ - **next-config:** support topLevelAwait ([3cb4f90](https://github.com/ho-nl/m2-pwa/commit/3cb4f90ac3af797f5fcba888dfd28aa2b76480b8))
81
82
 
82
83
  ## [2.105.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.105.0...@graphcommerce/next-config@2.105.1) (2021-10-19)
83
84
 
84
85
  ### Bug Fixes
85
86
 
86
- - **next-config:** make sure webpack is available
87
- ([46edb3e](https://github.com/ho-nl/m2-pwa/commit/46edb3e6fd1b716d7d9dbe59cb1530375d24c228))
87
+ - **next-config:** make sure webpack is available ([46edb3e](https://github.com/ho-nl/m2-pwa/commit/46edb3e6fd1b716d7d9dbe59cb1530375d24c228))
88
88
 
89
89
  # [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.104.7...@graphcommerce/next-config@2.105.0) (2021-10-19)
90
90
 
91
91
  ### Bug Fixes
92
92
 
93
- - **next-config:** move the @apollo/client **DEV** env to next-config
94
- ([fb1df3f](https://github.com/ho-nl/m2-pwa/commit/fb1df3fe4edbf769afb4149c7beced70bb948be5))
93
+ - **next-config:** move the @apollo/client **DEV** env to next-config ([fb1df3f](https://github.com/ho-nl/m2-pwa/commit/fb1df3fe4edbf769afb4149c7beced70bb948be5))
95
94
 
96
95
  ### Features
97
96
 
98
- - **mesh:** move to a default .meshrc.yml format instead of the json file
99
- ([d9a30a7](https://github.com/ho-nl/m2-pwa/commit/d9a30a78baed2b85b77bbd80e94a6f047e2255b6))
97
+ - **mesh:** move to a default .meshrc.yml format instead of the json file ([d9a30a7](https://github.com/ho-nl/m2-pwa/commit/d9a30a78baed2b85b77bbd80e94a6f047e2255b6))
100
98
 
101
99
  ## [2.104.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.104.3...@graphcommerce/next-config@2.104.4) (2021-10-07)
102
100
 
103
101
  ### Bug Fixes
104
102
 
105
- - replace **DEV** with proper variable for optimizing the bundle size
106
- ([9b03209](https://github.com/ho-nl/m2-pwa/commit/9b032095f618846d132c00b8dc14fbb1b09c6ed8))
103
+ - replace **DEV** with proper variable for optimizing the bundle size ([9b03209](https://github.com/ho-nl/m2-pwa/commit/9b032095f618846d132c00b8dc14fbb1b09c6ed8))
107
104
 
108
105
  ## [2.104.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.104.2...@graphcommerce/next-config@2.104.3) (2021-09-30)
109
106
 
110
107
  ### Bug Fixes
111
108
 
112
- - .next folder doesn't always exist on vercel
113
- ([5f8f1a7](https://github.com/ho-nl/m2-pwa/commit/5f8f1a7c2c6690be113adfe2fef662c63781e91f))
109
+ - .next folder doesn't always exist on vercel ([5f8f1a7](https://github.com/ho-nl/m2-pwa/commit/5f8f1a7c2c6690be113adfe2fef662c63781e91f))
114
110
 
115
111
  ## [2.104.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.104.1...@graphcommerce/next-config@2.104.2) (2021-09-29)
116
112
 
117
113
  ### Bug Fixes
118
114
 
119
- - cache dependencylist
120
- ([257da86](https://github.com/ho-nl/m2-pwa/commit/257da860c22a7134896e99e2fcf9f67c0ce99363))
115
+ - cache dependencylist ([257da86](https://github.com/ho-nl/m2-pwa/commit/257da860c22a7134896e99e2fcf9f67c0ce99363))
121
116
 
122
117
  ## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.104.0...@graphcommerce/next-config@2.104.1) (2021-09-28)
123
118
 
124
119
  ### Bug Fixes
125
120
 
126
- - do not build on install
127
- ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
121
+ - do not build on install ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
128
122
 
129
123
  # [2.104.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.103.0...@graphcommerce/next-config@2.104.0) (2021-09-28)
130
124
 
131
125
  ### Features
132
126
 
133
- - created withYarn1Scopes functionality so we don't rely on actual workspaces
134
- ([7e491ca](https://github.com/ho-nl/m2-pwa/commit/7e491ca2276028a8587f6cd88b98ee451755c3d0))
127
+ - created withYarn1Scopes functionality so we don't rely on actual workspaces ([7e491ca](https://github.com/ho-nl/m2-pwa/commit/7e491ca2276028a8587f6cd88b98ee451755c3d0))
135
128
 
136
129
  # [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.102.3...@graphcommerce/next-config@2.103.0) (2021-09-28)
137
130
 
138
131
  ### Bug Fixes
139
132
 
140
- - withYarn1Workspaces is not a function
141
- ([a095bc9](https://github.com/ho-nl/m2-pwa/commit/a095bc9f0011fbe9180d0e1718f1b41e89a5f6d9))
133
+ - withYarn1Workspaces is not a function ([a095bc9](https://github.com/ho-nl/m2-pwa/commit/a095bc9f0011fbe9180d0e1718f1b41e89a5f6d9))
142
134
 
143
135
  ### Features
144
136
 
145
- - add postinstall commands to run properly on deploy
146
- ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
137
+ - add postinstall commands to run properly on deploy ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
147
138
 
148
139
  ## [2.102.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.102.2...@graphcommerce/next-config@2.102.3) (2021-09-27)
149
140
 
150
141
  ### Bug Fixes
151
142
 
152
- - build packages before releasing
153
- ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
143
+ - build packages before releasing ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
154
144
 
155
145
  ## [2.102.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.102.0...@graphcommerce/next-config@2.102.2) (2021-09-27)
156
146
 
157
147
  ### Bug Fixes
158
148
 
159
- - add warnings to next.config.js when .env variables are missing
160
- ([d9dffec](https://github.com/ho-nl/m2-pwa/commit/d9dffec8ebc9cb1c70ca5591cad5e42c9bbe30e6))
149
+ - add warnings to next.config.js when .env variables are missing ([d9dffec](https://github.com/ho-nl/m2-pwa/commit/d9dffec8ebc9cb1c70ca5591cad5e42c9bbe30e6))
161
150
 
162
151
  ## [2.102.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.102.0...@graphcommerce/next-config@2.102.1) (2021-09-27)
163
152
 
@@ -167,46 +156,33 @@ All notable changes to this project will be documented in this file. See
167
156
 
168
157
  ### Bug Fixes
169
158
 
170
- - ignore md files from triggering version updates
171
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
172
- - **next-config:** another shot at fixing next-config
173
- ([a4afe11](https://github.com/ho-nl/m2-pwa/commit/a4afe112aa1308c10bb407d5e3eebf1f239d789c))
174
- - **next-config:** automatically resolve the workspace dependencies
175
- ([4d739ec](https://github.com/ho-nl/m2-pwa/commit/4d739ec969591f96392f99e476016c6ad1d092cb))
176
- - playwright can't find the place order button
177
- ([b1fda5b](https://github.com/ho-nl/m2-pwa/commit/b1fda5b3e403dad621aba8ed895427f2166bc985))
159
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
160
+ - **next-config:** another shot at fixing next-config ([a4afe11](https://github.com/ho-nl/m2-pwa/commit/a4afe112aa1308c10bb407d5e3eebf1f239d789c))
161
+ - **next-config:** automatically resolve the workspace dependencies ([4d739ec](https://github.com/ho-nl/m2-pwa/commit/4d739ec969591f96392f99e476016c6ad1d092cb))
162
+ - playwright can't find the place order button ([b1fda5b](https://github.com/ho-nl/m2-pwa/commit/b1fda5b3e403dad621aba8ed895427f2166bc985))
178
163
 
179
164
  ### Features
180
165
 
181
- - **framer-sheet:** created separate package that can be implemented
182
- ([69cc8ce](https://github.com/ho-nl/m2-pwa/commit/69cc8ce3237125335524728a70f4dae050032108))
183
- - **next-config:** introduced package to streamline the setup of new examples
184
- ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
185
- - next.js 11
186
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
187
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
188
- [@reachdigital](https://github.com/reachdigital)
189
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
190
- - upgraded to nextjs 11
191
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
166
+ - **framer-sheet:** created separate package that can be implemented ([69cc8ce](https://github.com/ho-nl/m2-pwa/commit/69cc8ce3237125335524728a70f4dae050032108))
167
+ - **next-config:** introduced package to streamline the setup of new examples ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
168
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
169
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
170
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
192
171
 
193
172
  ## [2.101.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.101.0...@graphcommerce/next-config@2.101.1) (2021-09-01)
194
173
 
195
174
  ### Bug Fixes
196
175
 
197
- - playwright can't find the place order button
198
- ([b1fda5b](https://github.com/ho-nl/m2-pwa/commit/b1fda5b3e403dad621aba8ed895427f2166bc985))
176
+ - playwright can't find the place order button ([b1fda5b](https://github.com/ho-nl/m2-pwa/commit/b1fda5b3e403dad621aba8ed895427f2166bc985))
199
177
 
200
178
  # [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.100.10...@graphcommerce/next-config@2.101.0) (2021-08-12)
201
179
 
202
180
  ### Features
203
181
 
204
- - upgraded to nextjs 11
205
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
182
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
206
183
 
207
184
  ## [2.100.10](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-config@2.100.9...@graphcommerce/next-config@2.100.10) (2021-08-09)
208
185
 
209
186
  ### Bug Fixes
210
187
 
211
- - ignore md files from triggering version updates
212
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
188
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
package/dist/index.js CHANGED
@@ -16,13 +16,25 @@ function extendConfig(nextConfig) {
16
16
  // Allow importing yml/yaml files for graphql-mesh
17
17
  config.module?.rules?.push({ test: /\.ya?ml$/, use: 'js-yaml-loader' });
18
18
  // To properly properly treeshake @apollo/client we need to define the __DEV__ property
19
- config.plugins = [new webpack_1.DefinePlugin({ __DEV__: options.dev }), ...(config.plugins ?? [])];
19
+ if (!options.isServer) {
20
+ config.plugins = [new webpack_1.DefinePlugin({ __DEV__: options.dev }), ...(config.plugins ?? [])];
21
+ }
20
22
  // @lingui .po file support
21
23
  config.module?.rules?.push({ test: /\.po/, use: '@lingui/loader' });
22
24
  config.experiments = {
23
25
  layers: true,
24
26
  topLevelAwait: true,
25
27
  };
28
+ config.snapshot = {
29
+ ...(config.snapshot ?? {}),
30
+ managedPaths: [/^(.+?[\\/]node_modules[\\/])(?!@graphcommerce)/],
31
+ };
32
+ // `config.watchOptions.ignored = ['**/.git/**', '**/node_modules/**', '**/.next/**']
33
+ // Replace the '**/node_modules/**' with a regex that excludes node_modules except @graphcommerce
34
+ config.watchOptions = {
35
+ ...(config.watchOptions ?? {}),
36
+ ignored: ['**/.git/**', '**/node_modules/!(@graphcommerce)**', '**/.next/**'],
37
+ };
26
38
  return typeof nextConfig.webpack === 'function' ? nextConfig.webpack(config, options) : config;
27
39
  },
28
40
  };
@@ -82,6 +94,7 @@ function withYarn1Workspaces(modules = []) {
82
94
  // do nothing
83
95
  }
84
96
  }
97
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
85
98
  const workspaceInfo = JSON.parse(JSON.parse(infoJson).data);
86
99
  const requestedPackages = [
87
100
  ...Object.keys(packageJson.dependencies ?? {}),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-config",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.3",
5
+ "version": "3.1.1",
6
6
  "type": "commonjs",
7
7
  "main": "dist/index.js",
8
8
  "typings": "dist/index.d.ts",
@@ -16,14 +16,15 @@
16
16
  "@lingui/loader": "^3.13.2",
17
17
  "js-yaml-loader": "^1.2.2",
18
18
  "next-transpile-modules": "^9.0.0",
19
- "type-fest": "^2.12.0"
19
+ "webpack": "^5.70.0"
20
20
  },
21
21
  "devDependencies": {
22
- "typescript": "^4.5.5",
23
- "webpack": "^5.69.1"
22
+ "typescript": "4.6.3",
23
+ "type-fest": "2.12.1"
24
24
  },
25
25
  "peerDependencies": {
26
- "next": "^12.0.10"
26
+ "next": "^12.0.10",
27
+ "webpack": "^5.70.0"
27
28
  },
28
29
  "files": [
29
30
  "dist",
package/src/index.ts CHANGED
@@ -39,7 +39,9 @@ function extendConfig(nextConfig: NextConfig): NextConfig {
39
39
  config.module?.rules?.push({ test: /\.ya?ml$/, use: 'js-yaml-loader' })
40
40
 
41
41
  // To properly properly treeshake @apollo/client we need to define the __DEV__ property
42
- config.plugins = [new DefinePlugin({ __DEV__: options.dev }), ...(config.plugins ?? [])]
42
+ if (!options.isServer) {
43
+ config.plugins = [new DefinePlugin({ __DEV__: options.dev }), ...(config.plugins ?? [])]
44
+ }
43
45
 
44
46
  // @lingui .po file support
45
47
  config.module?.rules?.push({ test: /\.po/, use: '@lingui/loader' })
@@ -49,6 +51,18 @@ function extendConfig(nextConfig: NextConfig): NextConfig {
49
51
  topLevelAwait: true,
50
52
  }
51
53
 
54
+ config.snapshot = {
55
+ ...(config.snapshot ?? {}),
56
+ managedPaths: [/^(.+?[\\/]node_modules[\\/])(?!@graphcommerce)/],
57
+ }
58
+
59
+ // `config.watchOptions.ignored = ['**/.git/**', '**/node_modules/**', '**/.next/**']
60
+ // Replace the '**/node_modules/**' with a regex that excludes node_modules except @graphcommerce
61
+ config.watchOptions = {
62
+ ...(config.watchOptions ?? {}),
63
+ ignored: ['**/.git/**', '**/node_modules/!(@graphcommerce)**', '**/.next/**'],
64
+ }
65
+
52
66
  return typeof nextConfig.webpack === 'function' ? nextConfig.webpack(config, options) : config
53
67
  },
54
68
  }
@@ -118,6 +132,7 @@ export function withYarn1Workspaces(modules: string[] = []): (config: NextConfig
118
132
  }
119
133
  }
120
134
 
135
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
121
136
  const workspaceInfo = JSON.parse(JSON.parse(infoJson).data) as WorkspaceInfo
122
137
 
123
138
  const requestedPackages = [