web: copy static assets only once

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-22 14:54:12 +01:00
parent 8a451bb5f6
commit 4f8b882554
2 changed files with 6 additions and 10 deletions

View File

@ -11,7 +11,7 @@
<title>{% block title %}{% trans title|default:config.authentik.branding.title %}{% endblock %}</title> <title>{% block title %}{% trans title|default:config.authentik.branding.title %}{% endblock %}</title>
<link rel="icon" type="image/png" href="{% static 'dist/assets/icons/icon.png' %}?v={{ ak_version }}"> <link rel="icon" type="image/png" href="{% static 'dist/assets/icons/icon.png' %}?v={{ ak_version }}">
<link rel="shortcut icon" type="image/png" href="{% static 'dist/assets/icons/icon.png' %}?v={{ ak_version }}"> <link rel="shortcut icon" type="image/png" href="{% static 'dist/assets/icons/icon.png' %}?v={{ ak_version }}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly-base.css' %}?v={{ ak_version }}"> <link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}?v={{ ak_version }}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}?v={{ ak_version }}"> <link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}?v={{ ak_version }}">
<script src="{% url 'authentik_api:javascript-catalog' %}?v={{ ak_version }}"></script> <script src="{% url 'authentik_api:javascript-catalog' %}?v={{ ak_version }}"></script>
{% block head %} {% block head %}

View File

@ -10,7 +10,7 @@ import externalGlobals from "rollup-plugin-external-globals";
const resources = [ const resources = [
{ src: "node_modules/rapidoc/dist/rapidoc-min.js", dest: "dist/" }, { src: "node_modules/rapidoc/dist/rapidoc-min.js", dest: "dist/" },
{ src: "node_modules/@patternfly/patternfly/patternfly-base.css", dest: "dist/" }, { src: "node_modules/@patternfly/patternfly/patternfly.min.css", dest: "dist/" },
{ src: "src/authentik.css", dest: "dist/" }, { src: "src/authentik.css", dest: "dist/" },
{ src: "node_modules/@patternfly/patternfly/assets/*", dest: "dist/assets/" }, { src: "node_modules/@patternfly/patternfly/assets/*", dest: "dist/assets/" },
@ -53,6 +53,10 @@ export default [
"outDir": "./api/dist/", "outDir": "./api/dist/",
}), }),
isProdBuild && terser(), isProdBuild && terser(),
copy({
targets: [...resources],
copyOnce: false,
}),
].filter(p => p), ].filter(p => p),
watch: { watch: {
clearScreen: false, clearScreen: false,
@ -79,10 +83,6 @@ export default [
commonjs(), commonjs(),
sourcemaps(), sourcemaps(),
isProdBuild && terser(), isProdBuild && terser(),
copy({
targets: [...resources],
copyOnce: false,
}),
].filter(p => p), ].filter(p => p),
watch: { watch: {
clearScreen: false, clearScreen: false,
@ -110,10 +110,6 @@ export default [
commonjs(), commonjs(),
sourcemaps(), sourcemaps(),
isProdBuild && terser(), isProdBuild && terser(),
copy({
targets: [...resources],
copyOnce: false,
}),
].filter(p => p), ].filter(p => p),
watch: { watch: {
clearScreen: false, clearScreen: false,