* master: (50 commits) update NoErrorsPlugin to NoEmitOnErrorsPlugin Undo change to `swagger-client` dependency trigger setScheme when a new set of schemes come in fix eslint issues pin yams version update dist revert dependencies minify bundle css migrate webpack to v2.6.1 #3110 - Fix models down arrow icon in firefox Fixes #3299 - export validateNumber and validateInteger for easy reuse and testing. Broke validateParam required check onto multiple lines. Added tests for validateNumber, validateInteger, and validateParam Improve README with more information about `urls` Rename variable: "selectedName" -> "primaryName" "name" -> "urls.primaryName" Update selectedIndex when a new URL is loaded Use select value to avoid react warning Properly added name config Now access it through getConfigs Documented it in README Add displayRequestDuration configuration option. Fix for #2947 - Display property names for non-object models #3256 - Remove unnecessary JSON.stringify call on example values that are already strings ... # Conflicts: # dist/swagger-ui-bundle.js # dist/swagger-ui-bundle.js.map # dist/swagger-ui-standalone-preset.js # dist/swagger-ui-standalone-preset.js.map # dist/swagger-ui.css # dist/swagger-ui.css.map # dist/swagger-ui.js # dist/swagger-ui.js.map # make-webpack-config.js # package.json # webpack-dist.config.js # webpack-hot-dev-server.config.js
91 lines
1.7 KiB
JavaScript
91 lines
1.7 KiB
JavaScript
var path = require('path')
|
|
|
|
var rules = [
|
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
|
use: [
|
|
{
|
|
loader: 'worker-loader',
|
|
options: {
|
|
inline: true
|
|
}
|
|
},
|
|
{ loader: 'babel-loader' }
|
|
]
|
|
},
|
|
{ test: /\.(jsx)(\?.*)?$/,
|
|
use: [
|
|
{ loader: 'react-hot-loader' },
|
|
{ loader: 'babel-loader' }
|
|
]
|
|
},
|
|
{ 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'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{ test: /\.(less)(\?.*)?$/,
|
|
use: [
|
|
'style-loader',
|
|
'css-loader',
|
|
{
|
|
loader: 'postcss-loader',
|
|
},
|
|
'less-loader'
|
|
]
|
|
}
|
|
]
|
|
|
|
module.exports = require("./make-webpack-config")(rules, {
|
|
_special: {
|
|
separateStylesheets: false,
|
|
testSpecName: process.env['TEST_SPEC_NAME']
|
|
},
|
|
devtool: "eval",
|
|
entry: {
|
|
'swagger-ui-bundle': [
|
|
'./src/polyfills',
|
|
'./src/core/index.js'
|
|
],
|
|
'swagger-ui-standalone-preset': [
|
|
'./src/polyfills',
|
|
'./src/standalone/index.js',
|
|
]
|
|
},
|
|
output: {
|
|
pathinfo: true,
|
|
filename: '[name].js',
|
|
library: "[name]",
|
|
libraryTarget: "umd",
|
|
chunkFilename: "[id].js"
|
|
},
|
|
devServer: {
|
|
port: 3200,
|
|
contentBase: path.join(__dirname, 'dev-helpers'),
|
|
publicPath: "/",
|
|
noInfo: true,
|
|
hot: true,
|
|
stats: {
|
|
colors: true
|
|
},
|
|
},
|
|
})
|