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:
74
webpack/dev-e2e.js
Normal file
74
webpack/dev-e2e.js
Normal 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
|
||||
Reference in New Issue
Block a user