Merge branch 'master' into webpack-migration-2.x
# 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.js # dist/swagger-ui.js.map # package.json # webpack-dist.config.js # webpack-hot-dev-server.config.js
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var path = require('path')
|
||||
var fs = require('fs')
|
||||
var node_modules = fs.readdirSync('node_modules').filter(function(x) { return x !== '.bin' })
|
||||
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
|
||||
var rules = [
|
||||
@@ -66,9 +66,9 @@ module.exports = require('./make-webpack-config.js')(rules, {
|
||||
|
||||
entry: {
|
||||
"swagger-ui": [
|
||||
'babel-polyfill',
|
||||
'./src/style/main.scss',
|
||||
'./src/core/index.js'
|
||||
"./src/style/main.scss",
|
||||
"./src/polyfills",
|
||||
"./src/core/index.js"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -76,11 +76,11 @@ module.exports = require('./make-webpack-config.js')(rules, {
|
||||
// webpack injects some stuff into the resulting file,
|
||||
// these libs need to be pulled in to keep that working.
|
||||
var exceptionsForWebpack = ["ieee754", "base64-js"]
|
||||
if(node_modules.indexOf(request) !== -1 || exceptionsForWebpack.indexOf(request) !== -1) {
|
||||
cb(null, 'commonjs ' + request)
|
||||
return;
|
||||
if(nodeModules.indexOf(request) !== -1 || exceptionsForWebpack.indexOf(request) !== -1) {
|
||||
cb(null, "commonjs " + request)
|
||||
return
|
||||
}
|
||||
cb();
|
||||
cb()
|
||||
},
|
||||
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user