diff --git a/CHANGELOG.md b/CHANGELOG.md index 9efd5f4..77eef95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,12 @@ As this project is a user-facing application, the places in the semantic version ### Added - Code highlighting for XML and YAML [#30](https://github.com/spraakbanken/mink-frontend/issues/30) +- HTTP compression ### Changed - Drop unnecessary async usage of the `js-yaml` package +- The FormKit and Highlight.js libs are imported dynamically to allow for a smaller main asset chunk ### Fixed diff --git a/public/.htaccess b/public/.htaccess index 4a79b03..334b637 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -3,4 +3,12 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.html [L] - \ No newline at end of file + + +AddOutputFilterByType DEFLATE application/javascript +AddOutputFilterByType DEFLATE text/css +AddOutputFilterByType DEFLATE text/html +AddOutputFilterByType DEFLATE text/javascript +AddOutputFilterByType DEFLATE text/plain +AddOutputFilterByType DEFLATE text/xml +AddOutputFilterByType DEFLATE image/svg+xml diff --git a/src/components/FormKitWrapper.vue b/src/components/FormKitWrapper.vue new file mode 100644 index 0000000..33aa109 --- /dev/null +++ b/src/components/FormKitWrapper.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/components/SyntaxHighlight.vue b/src/components/SyntaxHighlight.vue index 253c350..4c17965 100644 --- a/src/components/SyntaxHighlight.vue +++ b/src/components/SyntaxHighlight.vue @@ -1,4 +1,11 @@ diff --git a/src/corpus/config/CorpusConfiguration.vue b/src/corpus/config/CorpusConfiguration.vue index a0d3e01..e9f73d1 100644 --- a/src/corpus/config/CorpusConfiguration.vue +++ b/src/corpus/config/CorpusConfiguration.vue @@ -16,6 +16,7 @@ import { import type { ConfigSentenceSegmenter } from "@/api/sparvConfig.types"; import HelpBox from "@/components/HelpBox.vue"; import LayoutSection from "@/components/LayoutSection.vue"; +import FormKitWrapper from "@/components/FormKitWrapper.vue"; import useCorpusIdParam from "@/corpus/corpusIdParam.composable"; import RouteButton from "@/components/RouteButton.vue"; import useMessenger from "@/message/messenger.composable"; @@ -25,6 +26,7 @@ import useConfig from "@/corpus/config/config.composable"; import type { ByLang } from "@/util.types"; import LayoutBox from "@/components/LayoutBox.vue"; import TerminalOutput from "@/components/TerminalOutput.vue"; +import { FormKit } from "@formkit/vue"; const router = useRouter(); const corpusId = useCorpusIdParam(); @@ -118,142 +120,143 @@ async function submit(fields: Form) {