Files
swagger-ui/webpack-hot-dev-server.config.js
kyle 21bb452cb7 housekeeping: address inconsistently truncated JS asset responses within Cypress tests (via #5445)
* add Cypress error trace

* Update package.json

* Update webpack-hot-dev-server.config.js

* Update index.js

* Update index.js
2019-07-08 00:19:40 -05:00

74 lines
1.4 KiB
JavaScript

const path = require("path")
const rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: "worker-loader",
options: {
inline: true
}
},
{ loader: "babel-loader?retainLines=true" }
]
},
{ test: /\.(css)(\?.*)?$/,
use: [
"style-loader",
"css-loader",
"postcss-loader"
]
},
{ test: /\.(scss)(\?.*)?$/,
use: [
"style-loader",
"css-loader",
{
loader: "postcss-loader",
options: { sourceMap: true }
},
{ loader: "sass-loader",
options: {
outputStyle: "expanded",
sourceMap: true,
sourceMapContents: "true"
}
}
]
}
]
module.exports = require("./make-webpack-config")(rules, {
_special: {
separateStylesheets: false,
sourcemaps: true,
},
entry: {
"swagger-ui-bundle": [
"./src/polyfills",
"./src/core/index.js"
],
"swagger-ui-standalone-preset": [
"./src/style/main.scss",
"./src/polyfills",
"./src/standalone/index.js",
]
},
output: {
pathinfo: true,
filename: "[name].js",
library: "[name]",
libraryTarget: "umd",
chunkFilename: "[id].js"
},
devServer: {
port: 3200,
publicPath: "/",
noInfo: true,
disableHostCheck: true, // for development within VMs
stats: {
colors: true
},
},
})