Files
swagger-ui/webpack-dist-standalone.config.js
Fritz 37001b38bb build(umd-module): prevent mangling (#4320)
* Prevent mangling of names in UMD distribution

This makes debugging easier in general.

* use `uglifyOptions`
2018-05-21 21:31:27 -07:00

44 lines
856 B
JavaScript

const path = require("path")
const styleRules = require("./webpack.dist-style.config.js")
let rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: "worker-loader",
options: {
inline: true,
name: "[name].js"
}
},
{ loader: "babel-loader?retainLines=true" }
]
}
]
module.exports = require("./make-webpack-config.js")(rules, {
_special: {
separateStylesheets: true,
minimize: true,
mangle: true,
sourcemaps: true,
},
entry: {
"swagger-ui-standalone-preset": [
"./src/polyfills",
"./src/standalone/index.js"
]
},
output: {
path: path.join(__dirname, "dist"),
publicPath: "/dist",
library: "SwaggerUIStandalonePreset",
libraryTarget: "umd",
filename: "[name].js",
chunkFilename: "js/[name].js",
},
})