mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: compressor
This commit is contained in:
1 parent
6283ddc57a
commit
e946dfdb69
4 files changed
+7
-10
No files matched your search
@@ -4,6 +4,7 @@ import partytown from '@astrojs/partytown';
|
|||||||
import react from '@astrojs/react';
|
import react from '@astrojs/react';
|
||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from '@astrojs/sitemap';
|
||||||
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
|
import compressor from 'astro-compressor';
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -21,7 +22,7 @@ export default defineConfig({
|
|||||||
outDir: '../../dist/website',
|
outDir: '../../dist/website',
|
||||||
prefetch: true,
|
prefetch: true,
|
||||||
|
|
||||||
integrations: [react(), sitemap(), partytown()],
|
integrations: [react(), sitemap(), partytown(), compressor()],
|
||||||
vite: {
|
vite: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"@types/react": "^18.3.12",
|
"@types/react": "^18.3.12",
|
||||||
"@types/react-dom": "^18.3.1",
|
"@types/react-dom": "^18.3.1",
|
||||||
"@types/three": "^0.160.0",
|
"@types/three": "^0.160.0",
|
||||||
"astro": "^4.16.7"
|
"astro": "^4.16.7",
|
||||||
|
"astro-compressor": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,21 +10,16 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
Code,
|
Code,
|
||||||
Flex,
|
Flex,
|
||||||
Grid,
|
|
||||||
IconButton,
|
IconButton,
|
||||||
Link,
|
Link
|
||||||
ScrollArea,
|
|
||||||
Separator,
|
|
||||||
Text,
|
|
||||||
} from '@radix-ui/themes';
|
} from '@radix-ui/themes';
|
||||||
|
import { TOOLS } from '../constants/tools';
|
||||||
import { resolveBranchName } from '../core/blitzkit/branches';
|
import { resolveBranchName } from '../core/blitzkit/branches';
|
||||||
import { homeTool, TOOLS } from '../constants/tools';
|
|
||||||
import { LinkI18n } from './LinkI18n';
|
|
||||||
import { getStrings } from '../core/i18n/getStrings';
|
import { getStrings } from '../core/i18n/getStrings';
|
||||||
import { Var } from '../core/radix/var';
|
import { Var } from '../core/radix/var';
|
||||||
|
import { LinkI18n } from './LinkI18n';
|
||||||
|
|
||||||
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
|
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
|
||||||
const tools = [homeTool, ...toolsFiltered];
|
|
||||||
const { locale } = Astro.params;
|
const { locale } = Astro.params;
|
||||||
const branchName = resolveBranchName(locale);
|
const branchName = resolveBranchName(locale);
|
||||||
const isBranchNamed = branchName !== undefined;
|
const isBranchNamed = branchName !== undefined;
|
||||||
|
|||||||
Reference in new issue
Block a user