diff --git a/webpack/_config-builder.js b/webpack/_config-builder.js index 7f5b95b1..8d7bc492 100644 --- a/webpack/_config-builder.js +++ b/webpack/_config-builder.js @@ -115,6 +115,12 @@ export default function buildConfig( resolve: { modules: [path.join(projectBasePath, "./src"), "node_modules"], extensions: [".web.js", ".js", ".jsx", ".json", ".less"], + // these aliases make sure that we don't bundle same libraries twice + // when the versions of these libraries diverge between swagger-js and swagger-ui + alias: { + "@babel/runtime-corejs2": path.resolve(__dirname, '..', 'node_modules/@babel/runtime-corejs2'), + "js-yaml": path.resolve(__dirname, '..', 'node_modules/js-yaml') + }, }, // If we're mangling, size is a concern -- so use trace-only sourcemaps diff --git a/webpack/bundle.babel.js b/webpack/bundle.babel.js index 55e97730..7b3cca33 100644 --- a/webpack/bundle.babel.js +++ b/webpack/bundle.babel.js @@ -24,14 +24,6 @@ const result = configBuilder( output: { library: "SwaggerUIBundle", }, - resolve: { - // these aliases make sure that we don't bundle same libraries twice - // when the versions of these libraries diverge between swagger-js and swagger-ui - alias: { - "@babel/runtime-corejs2": path.resolve(__dirname, '..', 'node_modules/@babel/runtime-corejs2'), - "js-yaml": path.resolve(__dirname, '..', 'node_modules/js-yaml') - }, - }, } )