build(webpack): move resolve alises to one common place
As resolving applies to everything and not just specific builds the resolve.aliases have been moved to one common place.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user