Skip to content

Commit b43469c

Browse files
authored
build(webpack): remove ApiDOM resolve aliases (#29)
Instead of maintaining the fragile resolve aliases, npm overrides package.json field will be used to avoid double-bundling different versions of ApiDOM.
1 parent d9686c8 commit b43469c

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -363,71 +363,6 @@ module.exports = function (webpackEnv) {
363363
// This alias makes sure we're avoiding a runtime error related to this package
364364
'@stoplight/ordered-object-literal$':
365365
'/node_modules/@stoplight/ordered-object-literal/src/index.mjs',
366-
// This alias makes sure we don't pull two different versions of ApiDOM.
367-
// swagger-client uses ApiDOM as well, and might come with different ApiDOM version.
368-
// SwaggerEditor ApiDOM dependency takes precendence in the resolution.
369-
'@swagger-api/apidom-ast$':
370-
'/node_modules/@swagger-api/apidom-ast/es/index.mjs',
371-
'@swagger-api/apidom-core$':
372-
'/node_modules/@swagger-api/apidom-core/es/index.mjs',
373-
'@swagger-api/apidom-error$':
374-
'/node_modules/@swagger-api/apidom-error/es/index.mjs',
375-
'@swagger-api/apidom-json-path$':
376-
'/node_modules/@swagger-api/apidom-json-path/es/index.mjs',
377-
'@swagger-api/apidom-json-pointer$':
378-
'/node_modules/@swagger-api/apidom-json-pointer/es/index.mjs',
379-
'@swagger-api/apidom-ls$':
380-
'/node_modules/@swagger-api/apidom-ls/es/index.mjs',
381-
'@swagger-api/apidom-ns-api-design-systems$':
382-
'/node_modules/@swagger-api/apidom-ns-api-design-systems/es/index.mjs',
383-
'@swagger-api/apidom-ns-asyncapi-2$':
384-
'/node_modules/@swagger-api/apidom-ns-asyncapi-2/es/index.mjs',
385-
'@swagger-api/apidom-ns-json-schema-draft-4$':
386-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-4/es/index.mjs',
387-
'@swagger-api/apidom-ns-json-schema-draft-6$':
388-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-6/es/index.mjs',
389-
'@swagger-api/apidom-ns-json-schema-draft-7$':
390-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-7/es/index.mjs',
391-
'@swagger-api/apidom-ns-openapi-3-0$':
392-
'/node_modules/@swagger-api/apidom-ns-openapi-3-0/es/index.mjs',
393-
'@swagger-api/apidom-ns-openapi-3-1$':
394-
'/node_modules/@swagger-api/apidom-ns-openapi-3-1/es/index.mjs',
395-
'@swagger-api/apidom-parser$':
396-
'/node_modules/@swagger-api/apidom-parser/es/parser.mjs',
397-
'@swagger-api/apidom-parser-adapter-api-design-systems-json$':
398-
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json/es/adapter.mjs',
399-
'@swagger-api/apidom-parser-adapter-api-design-systems-yaml$':
400-
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/es/adapter.mjs',
401-
'@swagger-api/apidom-parser-adapter-asyncapi-json-2$':
402-
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2/es/adapter.mjs',
403-
'@swagger-api/apidom-parser-adapter-asyncapi-yaml-2$':
404-
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/es/adapter.mjs',
405-
'@swagger-api/apidom-parser-adapter-json$':
406-
'/node_modules/@swagger-api/apidom-parser-adapter-json/es/adapter-browser.mjs',
407-
'@swagger-api/apidom-parser-adapter-openapi-json-3-0$':
408-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0/es/adapter.mjs',
409-
'@swagger-api/apidom-parser-adapter-openapi-json-3-1$':
410-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1/es/adapter.mjs',
411-
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-0$':
412-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/es/adapter.mjs',
413-
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-1$':
414-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/es/adapter.mjs',
415-
'@swagger-api/apidom-parser-adapter-yaml-1-2$':
416-
'/node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/es/adapter-browser.mjs',
417-
'@swagger-api/apidom-reference$':
418-
'/node_modules/@swagger-api/apidom-reference/es/configuration/saturated.mjs',
419-
'@swagger-api/apidom-reference/configuration/empty$':
420-
'/node_modules/@swagger-api/apidom-reference/es/configuration/empty.mjs',
421-
'@swagger-api/apidom-reference/resolve/strategies/openapi-3-1$':
422-
'/node_modules/@swagger-api/apidom-reference/es/resolve/strategies/openapi-3-1/index.mjs',
423-
'@swagger-api/apidom-reference/parse/parsers/binary$':
424-
'/node_modules/@swagger-api/apidom-reference/es/parse/parsers/binary/index-browser.mjs',
425-
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/$anchor$':
426-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/$anchor/index.mjs',
427-
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/uri$':
428-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/uri/index.mjs',
429-
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1$':
430-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/index.mjs',
431366
...(modules.webpackAliases || {}),
432367
},
433368
plugins: [

0 commit comments

Comments
 (0)