Skip to content

Commit 6d683a8

Browse files
authored
Merge pull request #615 from limzykenneth/fast-compress
Rework compression for faster build
2 parents 3754007 + 0617743 commit 6d683a8

File tree

8 files changed

+901
-428
lines changed

8 files changed

+901
-428
lines changed

astro.config.mjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineConfig, passthroughImageService } from "astro/config";
22
import preact from "@astrojs/preact";
33
import mdx from "@astrojs/mdx";
4-
import compress from "astro-compress";
54
import tailwind from "@astrojs/tailwind";
65
import serviceWorker from "astrojs-service-worker";
6+
import fast from "./src/scripts/fast-compress";
77

88
// Allow skipping compression step for faster test build times
99
// DO NOT SKIP COMPRESSION FOR DEPLOYMENT!
@@ -18,13 +18,14 @@ if (shouldSkipCompress) {
1818
// https://astro.build/config
1919
export default defineConfig({
2020
site: 'https://p5js.org',
21+
compressHTML: false,
2122
integrations: [
2223
preact({
2324
compat: true,
2425
}),
2526
mdx(),
2627
tailwind(),
27-
shouldSkipCompress ? null : compress(),
28+
fast(),
2829
serviceWorker({
2930
workbox: {
3031
globPatterns: [
@@ -54,6 +55,7 @@ export default defineConfig({
5455
trailingSlash: "always",
5556
build: {
5657
format: "directory",
58+
concurrency: 2
5759
},
5860
server: {
5961
watch: {

0 commit comments

Comments
 (0)