mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
merge branch heads and added ui-polyfill
This commit is contained in:
@@ -34,12 +34,7 @@ module.exports = {
|
|||||||
use: {
|
use: {
|
||||||
loader: "babel-loader",
|
loader: "babel-loader",
|
||||||
options: {
|
options: {
|
||||||
presets: [
|
presets: ["@scm-manager/babel-preset"]
|
||||||
"@babel/preset-env",
|
|
||||||
"@babel/preset-react",
|
|
||||||
"@babel/preset-flow"
|
|
||||||
],
|
|
||||||
plugins: ["@babel/plugin-proposal-class-properties"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -61,7 +56,13 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, "target", "scm-git-plugin-2.0.0-SNAPSHOT", "webapp", "assets"),
|
path: path.join(
|
||||||
|
__dirname,
|
||||||
|
"target",
|
||||||
|
"scm-git-plugin-2.0.0-SNAPSHOT",
|
||||||
|
"webapp",
|
||||||
|
"assets"
|
||||||
|
),
|
||||||
filename: "[name].bundle.js",
|
filename: "[name].bundle.js",
|
||||||
library: "scm-git-plugin",
|
library: "scm-git-plugin",
|
||||||
libraryTarget: "amd"
|
libraryTarget: "amd"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const path = require("path");
|
|||||||
const createIndexMiddleware = require("./IndexMiddleware");
|
const createIndexMiddleware = require("./IndexMiddleware");
|
||||||
const createContextPathMiddleware = require("./ContextPathMiddleware");
|
const createContextPathMiddleware = require("./ContextPathMiddleware");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = [{
|
||||||
context: path.resolve(__dirname, ".."),
|
context: path.resolve(__dirname, ".."),
|
||||||
entry: {
|
entry: {
|
||||||
webapp: [
|
webapp: [
|
||||||
@@ -99,7 +99,8 @@ module.exports = {
|
|||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
vendors: {
|
vendors: {
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: -10
|
priority: -10,
|
||||||
|
// chunks: chunk => chunk.name !== "polyfill"
|
||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
minChunks: 2,
|
minChunks: 2,
|
||||||
@@ -109,4 +110,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}, {
|
||||||
|
context: path.resolve(__dirname, ".."),
|
||||||
|
entry: {
|
||||||
|
polyfill: "./ui-polyfill/src/index.js"
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, "..", "target", "assets"),
|
||||||
|
filename: "[name].bundle.js"
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|||||||
13
scm-ui/ui-polyfill/package.json
Normal file
13
scm-ui/ui-polyfill/package.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "@scm-manager/ui-polyfill",
|
||||||
|
"version": "2.0.0-SNAPSHOT",
|
||||||
|
"description": "Polyfills for SCM-Manager UI",
|
||||||
|
"main": "src/index.js",
|
||||||
|
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/polyfill": "^7.6.0",
|
||||||
|
"whatwg-fetch": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
scm-ui/ui-polyfill/src/index.js
Normal file
2
scm-ui/ui-polyfill/src/index.js
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import "@babel/polyfill";
|
||||||
|
import "whatwg-fetch";
|
||||||
@@ -13,6 +13,19 @@
|
|||||||
|
|
||||||
<base href="{{ contextPath }}">
|
<base href="{{ contextPath }}">
|
||||||
<title>SCM-Manager</title>
|
<title>SCM-Manager</title>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var modernBrowser = (
|
||||||
|
'fetch' in window &&
|
||||||
|
'assign' in Object
|
||||||
|
);
|
||||||
|
if ( !modernBrowser ) {
|
||||||
|
var scriptElement = document.createElement("script");
|
||||||
|
scriptElement.async = false;
|
||||||
|
scriptElement.src = "{{ contextPath }}/polyfills.bundle.js";
|
||||||
|
document.head.appendChild(scriptElement);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@@ -731,7 +731,7 @@
|
|||||||
"@babel/helper-regex" "^7.4.4"
|
"@babel/helper-regex" "^7.4.4"
|
||||||
regexpu-core "^4.6.0"
|
regexpu-core "^4.6.0"
|
||||||
|
|
||||||
"@babel/polyfill@^7.0.0":
|
"@babel/polyfill@^7.0.0", "@babel/polyfill@^7.6.0":
|
||||||
version "7.6.0"
|
version "7.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.6.0.tgz#6d89203f8b6cd323e8d946e47774ea35dc0619cc"
|
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.6.0.tgz#6d89203f8b6cd323e8d946e47774ea35dc0619cc"
|
||||||
integrity sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw==
|
integrity sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw==
|
||||||
|
|||||||
Reference in New Issue
Block a user