feat: expose plugins and presets on SwaggerUI global symbol (#9189)

Part of this commit is also:
- complete plugins consolidation
- complete presets consolidation
- build system consolidation

Refs #9188
This commit is contained in:
Vladimír Gorej
2023-09-05 09:56:51 +02:00
committed by GitHub
parent 8137a8b337
commit edd1153723
118 changed files with 28137 additions and 853 deletions

74
webpack/dev-e2e.js Normal file
View File

@@ -0,0 +1,74 @@
/**
* @prettier
*/
const path = require("path")
const configBuilder = require("./_config-builder")
const styleConfig = require("./stylesheets")
// Pretty much the same as devConfig, but with changes to port and static.directory
const devE2eConfig = configBuilder(
{
minimize: false,
mangle: false,
sourcemaps: true,
includeDependencies: true,
},
{
mode: "development",
entry: {
"swagger-ui-bundle": ["./src/core/index.js"],
"swagger-ui-standalone-preset": [
"./src/standalone/presets/standalone/index.js",
],
"swagger-ui": "./src/style/main.scss",
},
performance: {
hints: false,
},
output: {
filename: "[name].js",
chunkFilename: "[id].js",
library: {
name: "[name]",
export: "default",
},
publicPath: "/",
},
devServer: {
allowedHosts: "all", // for development within VMs
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*",
},
port: 3230,
host: "0.0.0.0",
hot: true,
static: {
directory: path.join(__dirname, "../", "test", "e2e-cypress", "static"),
publicPath: "/",
},
client: {
logging: "info",
progress: true,
},
devMiddleware: {},
},
}
)
// mix in the style config's plugins and loader rules
devE2eConfig.plugins = [...devE2eConfig.plugins, ...styleConfig.plugins]
devE2eConfig.module.rules = [
...devE2eConfig.module.rules,
...styleConfig.module.rules,
]
module.exports = devE2eConfig