Replace babel-polyfill with runtime transform
This commit is contained in:
committed by
Josh Ponelat
parent
00745bca38
commit
4a6716ffed
1
.babelrc
1
.babelrc
@@ -5,6 +5,7 @@
|
|||||||
"stage-0"
|
"stage-0"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
"transform-runtime",
|
||||||
[
|
[
|
||||||
"module-alias",
|
"module-alias",
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ module.exports = function(options) {
|
|||||||
extensions: ["", ".web.js", ".js", ".jsx", ".json", ".less"],
|
extensions: ["", ".web.js", ".js", ".jsx", ".json", ".less"],
|
||||||
packageAlias: 'browser',
|
packageAlias: 'browser',
|
||||||
alias: {
|
alias: {
|
||||||
base: "getbase/src/less/base"
|
base: "getbase/src/less/base",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
"just-test-in-node": "mocha --recursive --compilers js:babel-core/register test/core test/components test/bugs test/swagger-ui-dist-package"
|
"just-test-in-node": "mocha --recursive --compilers js:babel-core/register test/core test/components test/bugs test/swagger-ui-dist-package"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-polyfill": "^6.23.0",
|
|
||||||
"base64-js": "^1.2.0",
|
"base64-js": "^1.2.0",
|
||||||
"brace": "0.7.0",
|
"brace": "0.7.0",
|
||||||
"deep-extend": "0.4.1",
|
"deep-extend": "0.4.1",
|
||||||
@@ -83,6 +82,7 @@
|
|||||||
"babel-eslint": "^7.1.1",
|
"babel-eslint": "^7.1.1",
|
||||||
"babel-loader": "^6.3.2",
|
"babel-loader": "^6.3.2",
|
||||||
"babel-plugin-module-alias": "^1.6.0",
|
"babel-plugin-module-alias": "^1.6.0",
|
||||||
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
"babel-preset-es2015-ie": "^6.6.2",
|
"babel-preset-es2015-ie": "^6.6.2",
|
||||||
"babel-preset-react": "^6.23.0",
|
"babel-preset-react": "^6.23.0",
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ module.exports = function SwaggerUI(opts) {
|
|||||||
return downloadSpec()
|
return downloadSpec()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return system
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add presets
|
// Add presets
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ module.exports = require('./make-webpack-config.js')({
|
|||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
'swagger-ui-bundle': [
|
'swagger-ui-bundle': [
|
||||||
'babel-polyfill',
|
|
||||||
'./src/core/index.js'
|
'./src/core/index.js'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
var path = require('path')
|
const path = require("path")
|
||||||
var fs = require('fs')
|
const 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" })
|
||||||
|
|
||||||
|
module.exports = require("./make-webpack-config.js")({
|
||||||
module.exports = require('./make-webpack-config.js')({
|
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: true,
|
separateStylesheets: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
@@ -15,9 +14,8 @@ module.exports = require('./make-webpack-config.js')({
|
|||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
"swagger-ui": [
|
"swagger-ui": [
|
||||||
'babel-polyfill',
|
"./src/style/main.scss",
|
||||||
'./src/style/main.scss',
|
"./src/core/index.js"
|
||||||
'./src/core/index.js'
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -25,11 +23,11 @@ module.exports = require('./make-webpack-config.js')({
|
|||||||
// webpack injects some stuff into the resulting file,
|
// webpack injects some stuff into the resulting file,
|
||||||
// these libs need to be pulled in to keep that working.
|
// these libs need to be pulled in to keep that working.
|
||||||
var exceptionsForWebpack = ["ieee754", "base64-js"]
|
var exceptionsForWebpack = ["ieee754", "base64-js"]
|
||||||
if(node_modules.indexOf(request) !== -1 || exceptionsForWebpack.indexOf(request) !== -1) {
|
if(nodeModules.indexOf(request) !== -1 || exceptionsForWebpack.indexOf(request) !== -1) {
|
||||||
cb(null, 'commonjs ' + request)
|
cb(null, "commonjs " + request)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
cb();
|
cb()
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ module.exports = require("./make-webpack-config")({
|
|||||||
devtool: "eval",
|
devtool: "eval",
|
||||||
entry: {
|
entry: {
|
||||||
'swagger-ui-bundle': [
|
'swagger-ui-bundle': [
|
||||||
'webpack/hot/dev-server',
|
'./src/core/index.js'
|
||||||
'babel-polyfill',
|
|
||||||
'./src/core/index.js',
|
|
||||||
],
|
],
|
||||||
'swagger-ui-standalone-preset': [
|
'swagger-ui-standalone-preset': [
|
||||||
'webpack/hot/dev-server',
|
'webpack/hot/dev-server',
|
||||||
|
|||||||
Reference in New Issue
Block a user