File tree 1 file changed +26
-0
lines changed
src/content/configuration 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,32 @@ importing
303
303
- ` 'foo/bar' ` will resolve to ` 'foo/bar-node.js' ` as the ` "node" ` key comes before ` "require" ` key in the conditional exports object.
304
304
- ` 'foo/baz' ` will resolve to ` 'foo/baz-node.js' `
305
305
306
+ If you want to add your custom field names while still retaining the default Webpack values, you can use ` "..." ` :
307
+
308
+ ** webpack.config.js**
309
+
310
+ ``` js
311
+ module .exports = {
312
+ // ...
313
+ resolve: {
314
+ conditionNames: [' my-custom-condition' , ' ...' ],
315
+ },
316
+ };
317
+ ```
318
+
319
+ Alternatively, to prioritize the deault conditions first, then add your custom conditions:
320
+
321
+ ** webpack.config.js**
322
+
323
+ ``` js
324
+ module .exports = {
325
+ // ...
326
+ resolve: {
327
+ conditionNames: [' ...' , ' my-custom-condition' ],
328
+ },
329
+ };
330
+ ```
331
+
306
332
### resolve.descriptionFiles
307
333
308
334
` [string] = ['package.json'] `
You can’t perform that action at this time.
0 commit comments