web: fix build not working

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-23 10:02:39 +02:00
parent 450d69a1a4
commit e998919097
1 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import cssimport from "rollup-plugin-cssimport";
import copy from "rollup-plugin-copy"; import copy from "rollup-plugin-copy";
import babel from "@rollup/plugin-babel"; import babel from "@rollup/plugin-babel";
import replace from "@rollup/plugin-replace"; import replace from "@rollup/plugin-replace";
import * as authentik from "@goauthentik/api";
const extensions = [".js", ".jsx", ".ts", ".tsx"]; const extensions = [".js", ".jsx", ".ts", ".tsx"];
@ -99,7 +100,11 @@ export default [
plugins: [ plugins: [
cssimport(), cssimport(),
resolve({ extensions, browser: true }), resolve({ extensions, browser: true }),
commonjs(), // Because the API Client uses star exports from typescript, we have to explicitly tell rollup
// Which classes can be imported
commonjs({
namedExports: { '@goauthentik/api': Object.keys(authentik) },
}),
babel({ babel({
extensions, extensions,
babelHelpers: "runtime", babelHelpers: "runtime",
@ -131,7 +136,11 @@ export default [
plugins: [ plugins: [
cssimport(), cssimport(),
resolve({ extensions, browser: true }), resolve({ extensions, browser: true }),
commonjs(), // Because the API Client uses star exports from typescript, we have to explicitly tell rollup
// Which classes can be imported
commonjs({
namedExports: { '@goauthentik/api': Object.keys(authentik) },
}),
babel({ babel({
extensions, extensions,
babelHelpers: "runtime", babelHelpers: "runtime",