File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/content/configuration Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,32 @@ importing
303303- ` 'foo/bar' ` will resolve to ` 'foo/bar-node.js' ` as the ` "node" ` key comes before ` "require" ` key in the conditional exports object.
304304- ` 'foo/baz' ` will resolve to ` 'foo/baz-node.js' `
305305
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+
306332### resolve.descriptionFiles
307333
308334` [string] = ['package.json'] `
You can’t perform that action at this time.
0 commit comments