Skip to content

Commit

Permalink
build(webpack): remove ApiDOM resolve aliases (#29)
Browse files Browse the repository at this point in the history
Instead of maintaining the fragile resolve aliases,
npm overrides package.json field will be used
to avoid double-bundling different versions of ApiDOM.
  • Loading branch information
char0n authored Nov 1, 2023
1 parent d9686c8 commit b43469c
Showing 1 changed file with 0 additions and 65 deletions.
65 changes: 0 additions & 65 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,71 +363,6 @@ module.exports = function (webpackEnv) {
// This alias makes sure we're avoiding a runtime error related to this package
'@stoplight/ordered-object-literal$':
'/node_modules/@stoplight/ordered-object-literal/src/index.mjs',
// This alias makes sure we don't pull two different versions of ApiDOM.
// swagger-client uses ApiDOM as well, and might come with different ApiDOM version.
// SwaggerEditor ApiDOM dependency takes precendence in the resolution.
'@swagger-api/apidom-ast$':
'/node_modules/@swagger-api/apidom-ast/es/index.mjs',
'@swagger-api/apidom-core$':
'/node_modules/@swagger-api/apidom-core/es/index.mjs',
'@swagger-api/apidom-error$':
'/node_modules/@swagger-api/apidom-error/es/index.mjs',
'@swagger-api/apidom-json-path$':
'/node_modules/@swagger-api/apidom-json-path/es/index.mjs',
'@swagger-api/apidom-json-pointer$':
'/node_modules/@swagger-api/apidom-json-pointer/es/index.mjs',
'@swagger-api/apidom-ls$':
'/node_modules/@swagger-api/apidom-ls/es/index.mjs',
'@swagger-api/apidom-ns-api-design-systems$':
'/node_modules/@swagger-api/apidom-ns-api-design-systems/es/index.mjs',
'@swagger-api/apidom-ns-asyncapi-2$':
'/node_modules/@swagger-api/apidom-ns-asyncapi-2/es/index.mjs',
'@swagger-api/apidom-ns-json-schema-draft-4$':
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-4/es/index.mjs',
'@swagger-api/apidom-ns-json-schema-draft-6$':
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-6/es/index.mjs',
'@swagger-api/apidom-ns-json-schema-draft-7$':
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-7/es/index.mjs',
'@swagger-api/apidom-ns-openapi-3-0$':
'/node_modules/@swagger-api/apidom-ns-openapi-3-0/es/index.mjs',
'@swagger-api/apidom-ns-openapi-3-1$':
'/node_modules/@swagger-api/apidom-ns-openapi-3-1/es/index.mjs',
'@swagger-api/apidom-parser$':
'/node_modules/@swagger-api/apidom-parser/es/parser.mjs',
'@swagger-api/apidom-parser-adapter-api-design-systems-json$':
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-api-design-systems-yaml$':
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-asyncapi-json-2$':
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-asyncapi-yaml-2$':
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-json$':
'/node_modules/@swagger-api/apidom-parser-adapter-json/es/adapter-browser.mjs',
'@swagger-api/apidom-parser-adapter-openapi-json-3-0$':
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-openapi-json-3-1$':
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-0$':
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-1$':
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/es/adapter.mjs',
'@swagger-api/apidom-parser-adapter-yaml-1-2$':
'/node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/es/adapter-browser.mjs',
'@swagger-api/apidom-reference$':
'/node_modules/@swagger-api/apidom-reference/es/configuration/saturated.mjs',
'@swagger-api/apidom-reference/configuration/empty$':
'/node_modules/@swagger-api/apidom-reference/es/configuration/empty.mjs',
'@swagger-api/apidom-reference/resolve/strategies/openapi-3-1$':
'/node_modules/@swagger-api/apidom-reference/es/resolve/strategies/openapi-3-1/index.mjs',
'@swagger-api/apidom-reference/parse/parsers/binary$':
'/node_modules/@swagger-api/apidom-reference/es/parse/parsers/binary/index-browser.mjs',
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/$anchor$':
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/$anchor/index.mjs',
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/uri$':
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/uri/index.mjs',
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1$':
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/index.mjs',
...(modules.webpackAliases || {}),
},
plugins: [
Expand Down

0 comments on commit b43469c

Please sign in to comment.